#include <flint_version.h>
Collaboration diagram for FlintVersion:
Public Member Functions | |
FlintVersion (const std::string &dbdir) | |
void | create () |
Create the version file. | |
void | read_and_check (bool readonly) |
Read the version file and check it's a version we understand. | |
Private Attributes | |
std::string | filename |
The "iamflint" file (currently) contains a "magic" string identifying that this is a flint database and a database format version number.
Definition at line 31 of file flint_version.h.
FlintVersion::FlintVersion | ( | const std::string & | dbdir | ) | [inline] |
void FlintVersion::create | ( | ) |
Create the version file.
Definition at line 61 of file flint_version.cc.
References filename, flint_io_write(), FLINT_VERSION, MAGIC_LEN, MAGIC_STRING, O_BINARY, Xapian::Remote::open(), and VERSIONFILE_SIZE.
Referenced by FlintDatabase::create_and_open_tables(), and read_and_check().
void FlintVersion::read_and_check | ( | bool | readonly | ) |
Read the version file and check it's a version we understand.
readonly | true if the database is being opened readonly. |
Definition at line 92 of file flint_version.cc.
References create(), filename, flint_io_read(), FLINT_VERSION, MAGIC_LEN, MAGIC_STRING, msvc_posix_rename(), O_BINARY, om_tostring(), Xapian::Remote::open(), size, STRINGIZE, and VERSIONFILE_SIZE.
Referenced by FlintDatabase::open_tables(), and FlintDatabase::open_tables_consistent().
std::string FlintVersion::filename [private] |
Definition at line 32 of file flint_version.h.
Referenced by create(), FlintVersion(), and read_and_check().