Open-RJ C/C++ User's Journal Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

DatabaseBase Class Reference

#include <openrj/cpp/databasebase.hpp>

Inheritance diagram for DatabaseBase:

FileDatabase MemoryDatabase List of all members.

Detailed Description

This class implements the common database manipulation for the FileDatabase and MemoryDatabase classes.


Construction

virtual ~DatabaseBase ()
 Closes the database.
virtual void Close ()
 Closes the database.
 DatabaseBase (ORJDatabase const *database)
 Constructs a database instance from the given database structure.


Constructor & Destructor Documentation

DatabaseBase ( ORJDatabase const *  database  )  [inline, explicit, protected]

Constructs a database instance from the given database structure.

Parameters:
database The pointer to the database structure

virtual ~DatabaseBase (  )  [inline, virtual]

Closes the database.


Member Function Documentation

virtual void Close (  )  [inline, virtual]

Closes the database.

Reimplemented in FileDatabase, and MemoryDatabase.

const Field GetField ( size_t  index  )  const [inline]

Returns the requested record.

Parameters:
index The index of the record to be returned. Must be less than the value returned by GetNumRecords()
Examples:
example_cpp_5.cpp.

size_t GetNumFields (  )  const [inline]

Returns the number of fields in the database.

Examples:
example_cpp_1.cpp, example_cpp_2.cpp, example_cpp_5.cpp, and example_cpp_6.cpp.

size_t GetNumLines (  )  const [inline]

Returns the number of lines in the database.

Examples:
example_cpp_1.cpp, example_cpp_2.cpp, and example_cpp_6.cpp.

size_t GetNumRecords (  )  const [inline]

Returns the number of records in the database.

Examples:
example_cpp_1.cpp, example_cpp_2.cpp, and example_cpp_6.cpp.

const Record GetRecord ( size_t  index  )  const [inline]

Returns the requested record.

Parameters:
index The index of the record to be returned. Must be less than the value returned by GetNumRecords()

bool is_open (  )  const [inline]

Indicates whether the database is open.

const Record operator[] ( int  index  )  const [inline]

Returns the requested record.

Parameters:
index The index of the record to be returned. Must be less than the value returned by GetNumRecords()

const Record operator[] ( size_t  index  )  const [inline]

Returns the requested record.

Parameters:
index The index of the record to be returned. Must be less than the value returned by GetNumRecords()


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

Open-RJ Library documentation © Synesis Software Pty Ltd, 2004-2005