Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Database Declarations
[OOFILE macros]


Detailed Description

Used to make it simpler to write persistent table declarations by including common methods and defining relationship field types.

use \ingroup oofDatabaseDeclarationMacros to include items in this group


Defines

#define REL_REF_BODY(tb)
 common body of relationship tables.

#define DECLARE_REF(tb)
 define related tables at end of 1:1 or 1:N relationship.

#define DECLARE_SET(tb)
 define related tables at end of N:1 or N:M relationship.

#define OOF_DEBUG_LOG_NAME
 Define this as a filename to build a logging version of OOFILE .

#define CLASS_TABLE   DECLARE_CLASS
 Old name for DECLARE_CLASS.

#define REF_TABLE   DECLARE_REF
 Old name for DECLARE_REF.

#define SET_TABLE   DECLARE_SET
 Old name for DECLARE_SET.


Define Documentation

#define CLASS_TABLE   DECLARE_CLASS
 

Old name for DECLARE_CLASS.

#define DECLARE_REF tb   ) 
 

Value:

class tb; \
class tb ## Ref : public dbRelRef {\
REL_REF_BODY(tb) };
define related tables at end of 1:1 or 1:N relationship.

#define DECLARE_SET tb   ) 
 

Value:

class tb; \
class tb ## Set : public dbRelSet { \
REL_REF_BODY(tb) };
define related tables at end of N:1 or N:M relationship.

#define OOF_DEBUG_LOG_NAME
 

Define this as a filename to build a logging version of OOFILE .

Warning:
can generate very large files and run quite slowly.

#define REF_TABLE   DECLARE_REF
 

Old name for DECLARE_REF.

#define REL_REF_BODY tb   ) 
 

Value:

public: \
tb* operator->() { return (tb*) relatedTable();} \
operator tb*() { return (tb*) relatedTable();} \
operator tb&() { return *((tb*) relatedTable());} \
unsigned long countAllRelatedIn(tb* rhs) { return CountAllRelatedIn((dbTable*)rhs); } \
unsigned long countAllRelatedIn(tb& rhs) { return CountAllRelatedIn((dbTable*)&rhs); } \
virtual bool pointsToCorrectTableType() const { return strcmp(#tb, mRelatedTableProto->defaultName())==0; }
common body of relationship tables.

Can be used by itself, if you want to add more members to the relationship field. Most commonly used inside other macros:

See also:
DECLARE_REF

DECLARE_SET

#define SET_TABLE   DECLARE_SET
 

Old name for DECLARE_SET.


Generated on Thu Jan 1 22:10:56 2004 for OOFILE by doxygen 1.3.5