GVectors::BinaryWriter Class Reference

Class for writing a binary vector store file to disk. More...

#include <binaryfilewriter.h>

Inheritance diagram for GVectors::BinaryWriter:

GVectors::FileWriter List of all members.

Public Member Functions

 BinaryWriter (std::string filename, vssize_t items)
 Constructor.
 BinaryWriter (const BinaryWriter &bw)
 Copy constructor.
virtual ~BinaryWriter ()
 Destructor.
void write (vslevel_t level, const vv_ref_t visualvector)
 Write the item to disk.

Private Attributes

GFileIO::GFile file
 The GFile used to write the data.

Detailed Description

This class writes a VectorStore to a binary vector store file.

Refer to binaryfilereader.h for details on the format used in binary vector store files.


Constructor & Destructor Documentation

BinaryWriter::BinaryWriter ( std::string  filename,
vssize_t  items 
)

Warning:
Although the 'endianess' field exists, it is not used.
Constructor.

Prepares the file for writing and opens it.

Parameters:
filename The filename of the file, where the VectorStore will be stored.
items The number of items to store. Has not practical meaning. Will be stored just for information.

BinaryWriter::BinaryWriter ( const BinaryWriter bw  ) 

Copy constructor.

Parameters:
bw A const reference to a BinaryWriter object.

BinaryWriter::~BinaryWriter (  )  [virtual]

Destructor. Closes the file.


Member Function Documentation

void BinaryWriter::write ( vslevel_t  level,
const vv_ref_t  visualvector 
) [virtual]

Remarks:
This method is called for each item to store.
Writes the VisualVector passed to the file.

Parameters:
level The level of the item in the tree. Will be written to the file, too.
visualvector The VisualVector to store in the file.

Implements GVectors::FileWriter.


Member Data Documentation

GFileIO::GFile GVectors::BinaryWriter::file [private]

The GFile used to write the data.

See

http://www.guengel.ch/myapps/libgfileio

for further details on GFile.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 19:37:30 2007 for libgvectors by  doxygen 1.4.7