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

database_base Class Reference

#include <openrj/stl/database.hpp>

Inheritance diagram for database_base:

file_database memory_database List of all members.

Detailed Description

This class acts as an implementation parent for both the file_database and memory_database classes.


Public Types

typedef record value_type
 The value type.
typedef value_type const const_reference
 The non-mutating (const) reference type.
typedef value_type const * const_pointer
 The non-mutating (const) pointer type.
typedef ptrdiff_t difference_type
 The difference type.
typedef size_t size_type
 The size type.
typedef stlsoft::proxy_iterator<
const ORJField, field, proxy_traits_type,
std::random_access_iterator_tag,
field
const_field_iterator
 The non-mutating (const) iterator type for enumerating all fields in the database.
typedef stlsoft::const_reverse_iterator_base<
const_field_iterator, field,
field, void, difference_type
const_reverse_field_iterator
 The non-mutating (const) reverse iterator type.
typedef size_t distance_type
 The distance type.
typedef stlsoft::indirect_reverse_iterator<
const_iterator, value_type,
value_type, void, difference_type,
std::random_access_iterator_tag > 
const_reverse_iterator
 The non-mutating (const) reverse iterator type.

Public Member Functions

 ~database_base ()
 Closes the database.
size_t num_lines () const
 Returns the number of lines in the database.
size_t num_fields () const
 Returns the number of fields in the database.
size_t num_records () const
 Returns the number of records in the database.
size_t size () const
 Returns the number of records in the database.
const record operator[] (size_t index) const
 Returns the requested record.
const_iterator begin () const
 Begins the iteration.
const_iterator end () const
 Ends the iteration.
const_reverse_iterator rbegin () const
 Begins the reverse iteration.
const_reverse_iterator rend () const
 Ends the reverse iteration.

Protected Types

typedef database_base class_type
 This type.

Classes

class  const_iterator
 This class implements iterator behaviour for the database classes. More...


Member Typedef Documentation

typedef database_base class_type [protected]

This type.

Reimplemented in file_database, and memory_database.

typedef stlsoft::proxy_iterator<const ORJField , field , proxy_traits_type , std::random_access_iterator_tag , field > const_field_iterator

The non-mutating (const) iterator type for enumerating all fields in the database.

typedef value_type const* const_pointer

The non-mutating (const) pointer type.

typedef value_type const const_reference

The non-mutating (const) reference type.

typedef stlsoft:: const_reverse_iterator_base< const_field_iterator , field , field , void , difference_type > const_reverse_field_iterator

The non-mutating (const) reverse iterator type.

typedef stlsoft:: indirect_reverse_iterator< const_iterator , value_type , value_type , void , difference_type , std::random_access_iterator_tag > const_reverse_iterator

The non-mutating (const) reverse iterator type.

typedef ptrdiff_t difference_type

The difference type.

typedef size_t distance_type

The distance type.

typedef size_t size_type

The size type.

typedef record value_type

The value type.


Constructor & Destructor Documentation

~database_base (  )  [inline]

Closes the database.


Member Function Documentation

database_base::const_iterator begin (  )  const [inline]

Begins the iteration.

Returns:
A non-mutating (const) iterator representing the start of the sequence
Examples:
example_stl_2.cpp, and example_stl_3.cpp.

database_base::const_iterator end (  )  const [inline]

Ends the iteration.

Returns:
A non-mutating (const) iterator representing the end of the sequence
Examples:
example_stl_2.cpp, and example_stl_3.cpp.

size_t num_fields (  )  const [inline]

Returns the number of fields in the database.

Examples:
example_stl_1.cpp, example_stl_2.cpp, example_stl_3.cpp, and example_stl_7.cpp.

size_t num_lines (  )  const [inline]

Returns the number of lines in the database.

Examples:
example_stl_1.cpp, example_stl_2.cpp, example_stl_3.cpp, and example_stl_7.cpp.

size_t num_records (  )  const [inline]

Returns the number of records in the database.

Examples:
example_stl_1.cpp, example_stl_2.cpp, example_stl_3.cpp, and example_stl_7.cpp.

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 size()

database_base::const_reverse_iterator rbegin (  )  const [inline]

Begins the reverse iteration.

Returns:
A non-mutating (const) iterator representing the start of the reverse sequence

database_base::const_reverse_iterator rend (  )  const [inline]

Ends the reverse iteration.

Returns:
A non-mutating (const) iterator representing the end of the reverse sequence

size_t size (  )  const [inline]

Returns the number of records in the database.

Examples:
example_stl_1.cpp, and example_stl_7.cpp.


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

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