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

FileDatabase Class Reference

#include <openrj/cpp/filedatabase.hpp>

Inheritance diagram for FileDatabase:

DatabaseBase List of all members.

Detailed Description

This class represents the Open-RJ database file, once read in and parsed.
Examples:

example_cpp_4.cpp.


Public Member Functions

Construction
 FileDatabase (char const *jarName, unsigned flags=0)
 Constructs a database instance from the given database file, and the optional flags.
virtual ~FileDatabase ()
 Closes the database.
virtual void Close ()
 Closes the database.
Attributes
char const * GetPath () const
 Returns the path of the database.


Constructor & Destructor Documentation

FileDatabase ( char const *  jarName,
unsigned  flags = 0 
) [inline, explicit]

Constructs a database instance from the given database file, and the optional flags.

Parameters:
jarName The database name
flags Combination of the ORJ_FLAG enumeration

virtual ~FileDatabase (  )  [inline, virtual]

Closes the database.


Member Function Documentation

virtual void Close (  )  [inline, virtual]

Closes the database.

Reimplemented from DatabaseBase.

const Field GetField ( size_t  index  )  const [inline, inherited]

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, inherited]

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, inherited]

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, inherited]

Returns the number of records in the database.

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

char const* GetPath (  )  const [inline]

Returns the path of the database.

const Record GetRecord ( size_t  index  )  const [inline, inherited]

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, inherited]

Indicates whether the database is open.

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

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, inherited]

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