QuartzMetaFile Class Reference

A class which encapsulates access to the Quartz meta-file, a small file describing global features of the database. More...

#include <quartz_metafile.h>

Collaboration diagram for QuartzMetaFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QuartzMetaFile (const std::string &filename_)
 Constructor.
 ~QuartzMetaFile ()
 Destructor.
void open ()
 Open the meta-file.
void create ()
 Create a new meta-file.

Private Attributes

std::string filename
 The filename of the meta-file.

Detailed Description

A class which encapsulates access to the Quartz meta-file, a small file describing global features of the database.

Definition at line 33 of file quartz_metafile.h.


Constructor & Destructor Documentation

QuartzMetaFile::QuartzMetaFile ( const std::string &  filename_  )  [inline]

Constructor.

Parameters:
filename_ The name of the meta-file

Definition at line 39 of file quartz_metafile.h.

QuartzMetaFile::~QuartzMetaFile (  )  [inline]

Destructor.

Definition at line 43 of file quartz_metafile.h.


Member Function Documentation

void QuartzMetaFile::open (  ) 

Open the meta-file.

Xapian::DatabaseOpeningError if the meta-file was not opened successfully or is not compatible with this version of the library.

Definition at line 68 of file quartz_metafile.cc.

References decode_version(), filename, metafile_magic, metafile_version, min_metafile_size, om_tostring(), startswith(), sys_close(), sys_open_to_read(), and sys_read_all_bytes().

Referenced by QuartzDatabase::create_and_open_tables(), QuartzDatabase::open_tables(), and QuartzDatabase::open_tables_consistent().

void QuartzMetaFile::create (  ) 

Create a new meta-file.

Xapian::DatabaseOpeningError if we couldn't create the meta-file.

Definition at line 98 of file quartz_metafile.cc.

References encode_version(), filename, metafile_magic, metafile_version, sys_close(), sys_open_to_write(), and sys_write_string().

Referenced by QuartzDatabase::create_and_open_tables().


Member Data Documentation

std::string QuartzMetaFile::filename [private]

The filename of the meta-file.

Definition at line 62 of file quartz_metafile.h.

Referenced by create(), and open().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.