xapian-core  1.4.21
Public Member Functions | Private Attributes | List of all members
ChertVersion Class Reference

The ChertVersion class manages the "iamchert" file. More...

#include <chert_version.h>

+ Collaboration diagram for ChertVersion:

Public Member Functions

 ChertVersion (const std::string &dbdir)
 
void create ()
 Create the version file. More...
 
void read_and_check ()
 Read the version file and check it's a version we understand. More...
 
const char * get_uuid () const
 Return pointer to 16 byte UUID. More...
 
std::string get_uuid_string () const
 Return UUID in the standard 36 character string format. More...
 

Private Attributes

std::string filename
 The filename of the version file. More...
 
Uuid uuid
 The UUID of this database. More...
 

Detailed Description

The ChertVersion class manages the "iamchert" file.

The "iamchert" file (currently) contains a "magic" string identifying that this is a chert database and a database format version number.

Definition at line 34 of file chert_version.h.

Constructor & Destructor Documentation

◆ ChertVersion()

ChertVersion::ChertVersion ( const std::string &  dbdir)
inlineexplicit

Definition at line 42 of file chert_version.h.

References create(), and read_and_check().

Member Function Documentation

◆ create()

void ChertVersion::create ( )

◆ get_uuid()

const char* ChertVersion::get_uuid ( ) const
inline

Return pointer to 16 byte UUID.

Definition at line 56 of file chert_version.h.

References Uuid::data().

◆ get_uuid_string()

std::string ChertVersion::get_uuid_string ( ) const
inline

Return UUID in the standard 36 character string format.

Definition at line 61 of file chert_version.h.

References Uuid::to_string().

Referenced by ChertDatabaseReplicator::get_uuid(), and ChertDatabase::get_uuid().

◆ read_and_check()

void ChertVersion::read_and_check ( )

Member Data Documentation

◆ filename

std::string ChertVersion::filename
private

The filename of the version file.

Definition at line 36 of file chert_version.h.

◆ uuid

Uuid ChertVersion::uuid
private

The UUID of this database.

Definition at line 39 of file chert_version.h.


The documentation for this class was generated from the following files: