31#define CDBIDX_DUPE_ACCESSION "=0.1"
32#define CDBIDX_VERSION "=0.2"
33#define CDBIDX_FILE_TOO_LARGE "=0.3"
34#define CDBIDX_SRC_FILE_SIZE "=0.4"
35#define CDBIDX_SRC_FILE_DATE "=0.5"
36#define CDBIDX_BUGFIX_10627 "=0.6"
40#define MAX_CDB_SIZE (OFFSET64_C(0xFFFFFFFFFFFF) - OFFSET64_C(0x1000000))
41#define MAX_CDB_SIZE_STR "256TB"
42#define OLD_MAX_CDB_SIZE_STR_4GB "4Gb"
43#define OLD_MAX_32_BIT_CDB_SIZE (0x7FFFFFFF - 0x1000000)
44#define OLD_MAX_32_BIT_CDB_SIZE_STR "2Gb"
52namespace matrix_science {
128 const char * versionNumber,
129 const char * sourceFileName);
136 std::string getIndexFileName()
const;
139 void setIndexFileName(
const char * filename);
142 bool openIndexFile(
const bool mayRetryBuilding);
145 void closeIndexFile();
148 bool isPossibleToCreate()
const;
151 bool isOpenForReading()
const;
154 bool isCreating()
const;
157 bool prepareToCreate();
160 bool saveValueForKey(
const char * keyName,
162 const unsigned int keyNameLen = 0,
163 const unsigned int valueLen = 0);
169 std::string getValueFromKey(
const std::string & keyName,
const int count = 0);
172 std::vector<std::string> getAllValuesFromKey(
const std::string & keyName);
175 OFFSET64_T getFileOffsetFromKey(
const std::string & keyName);
178 bool saveFileOffsetForKey(
const std::string & keyName, OFFSET64_T offset);
181 int getIntFromKey(
const std::string & keyName);
184 int getIntFromKey(
const std::string & keyName,
bool & found);
187 bool saveIntForKey(
const std::string & keyName,
int value);
190 int makeExists(
const char * key)
const;
200 std::string indexFileName_;
201 std::string versionNumber_;
202 std::string sourceFileName_;
203 bool isPossibleToCreate_;
206 struct cdb_make * cdbm_;
208 OFFSET64_T calcFileSize_;
209 bool addKeyErrorReported_;
210 bool tooLargeErrorReported_;
213 bool lockFile(
int hFile);
214 bool unlockFile(
int hFile);
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
Wrapper for the public domain tinycdb package http://www.corpit.ru/mjt/tinycdb.html by Michael Tokare...
Definition: ms_tinycdb.hpp:124