Main Page   Class Hierarchy   Compound List   File List   Compound Members  

dbReference< T > Class Template Reference

#include <reference.h>

Inheritance diagram for dbReference< T >:

dbAnyReference List of all members.

Public Methods

dbFieldDescriptordbDescribeComponents (dbFieldDescriptor *fd)
dbReference & operator= (dbReference const &ref)
dbReference & operator= (dbNullReference const &)
dbReference< T > & unsafeAssign (dbAnyReference const &ref)
bool operator== (dbReference const &ref) const
bool operator!= (dbReference const &ref) const
bool operator== (dbNullReference const &) const
bool operator!= (dbNullReference const &) const
 dbReference (dbNullReference const &)
 dbReference (dbReference const &ref)
 dbReference (oid_t oid=0)
oid_t getOid () const
bool isNull () const

Friends

bool isNull (dbAnyReference const &ref)

Detailed Description

template<class T>
class dbReference< T >

Template for reference parameterized by class of referenced records.


Constructor & Destructor Documentation

template<class T>
dbReference< T >::dbReference dbNullReference const &    [inline]
 

Constructor of null reference

template<class T>
dbReference< T >::dbReference dbReference< T > const &    ref [inline]
 

Copy constructor from reference of the same type

template<class T>
dbReference< T >::dbReference oid_t    oid = 0 [inline]
 

Construstor of reference from OID. Use this constructor with care, because FastDB is not able to check if asigned OID belongs to the required table. If you assign OID of record friom some other table and then use this reference, results will be unpredicted (even database corruption is possible)


Member Function Documentation

template<class T>
dbFieldDescriptor* dbReference< T >::dbDescribeComponents dbFieldDescriptor   fd [inline]
 

Internal method used to describe reference

Reimplemented from dbAnyReference.

oid_t dbAnyReference::getOid   const [inline, inherited]
 

Get object idetifier

Returns:
object identifier of referenced object

bool dbAnyReference::isNull   const [inline, inherited]
 

Check whether reference is null

template<class T>
bool dbReference< T >::operator!= dbNullReference const &    const [inline]
 

Operator for cecking if reference is not null

template<class T>
bool dbReference< T >::operator!= dbReference< T > const &    ref const [inline]
 

Operator for comparision of two references of the same type

template<class T>
dbReference& dbReference< T >::operator= dbNullReference const &    [inline]
 

Operator for assigning null to reference

Returns:
this reference

template<class T>
dbReference& dbReference< T >::operator= dbReference< T > const &    ref [inline]
 

Assignment operator

Parameters:
ref  assigned reference of the same type
Returns:
this reference

template<class T>
bool dbReference< T >::operator== dbNullReference const &    const [inline]
 

Operator for cecking if reference is null

template<class T>
bool dbReference< T >::operator== dbReference< T > const &    ref const [inline]
 

Operator for comparision of two references of the same type

template<class T>
dbReference<T>& dbReference< T >::unsafeAssign dbAnyReference const &    ref [inline]
 

Unsafe assignment operator. Assign any refernce.

Parameters:
ref  assigned reference. If it is not of the same type - result is unpredicted.
Returns:
this reference


Friends And Related Function Documentation

bool isNull dbAnyReference const &    ref [friend, inherited]
 

Check whether reference is null


The documentation for this class was generated from the following file:
Generated on Mon Oct 23 13:23:59 2006 for FastDB by doxygen1.2.18