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

oofmacro.h File Reference


Detailed Description

macros that define user tables and relationship classes.

included via oofile.h

#include "oofram.h"

Include dependency graph for oofmacro.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

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 ABSTRACT_BASE_METHODS(tb)
#define OOFILE_METHODS(tb)
#define DECLARE_ABSTRACT_CLASS(tb)
#define DECLARE_CLASS(tb)
#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 ABSTRACT_BASE_METHODS tb   ) 
 

Value:

public: \
virtual const char* defaultName() const { return #tb ;} \
tb& operator[](const dbQueryClause& rhs) { search(rhs);   return *this; } \
tb& operator[](unsigned long index) {   gotoRecord(index);  return *this;} \
tb& operator[](long index) {    assert(index>=0); gotoRecord(index);  return *this;} \
virtual dbTable* cloneTableWithoutSelection()       const {  return cloneTableConst(selNotShared); } \
virtual dbTable* cloneTableSharingSelection()       const { return cloneTableConst(selShared); } \
virtual dbTable* cloneTbleWithCachNoSelection()     const { return cloneTableConst(selNotSharedCacheCopied); } \
tb* cloneWithoutSelection()         const { return (tb*) cloneTableConst(selNotShared); } \
tb* cloneSharingSelection()         const { return (tb*) cloneTableConst(selShared); } \
tb* cloneWithCachNoSelection()  const { return (tb*) cloneTableConst(selNotSharedCacheCopied); } \
tb& operator-(tb& rhs) { dbTable::difference_with(rhs); return *this; } \
tb& difference_with(tb& rhs) { dbTable::difference_with(rhs); return *this; } \
tb& operator&(tb& rhs) { dbTable::intersection_with(rhs); return *this; } \
tb& intersection_with(tb& rhs) { dbTable::intersection_with(rhs); return *this; } \
tb& operator|(tb& rhs) { dbTable::union_with(rhs); return *this; } \
tb& operator+(tb& rhs) { dbTable::union_with(rhs); return *this; } \
tb& union_with(tb& rhs) { dbTable::union_with(rhs); return *this; } \
tb& operator=(const tb& rhs) { if (&rhs!=this) copyRecFrom(&rhs); return *this; } \
friend std::ostream& operator<<(std::ostream& os, tb& tbl) {tbl.extract(os); return os;} \
friend std::ostream& operator<<(std::ostream& os, tb* tbl) {tbl->extract(os); return os;} \
friend std::istream& operator>>(std::istream& is, tb& tbl) {tbl.insert(is); return is;} \
friend std::istream& operator>>(std::istream& is, tb* tbl) {tbl->insert(is); return is;}

#define DECLARE_ABSTRACT_CLASS tb   ) 
 

Value:

class tb : public dbTable { \
ABSTRACT_BASE_METHODS(tb)

#define DECLARE_CLASS tb   ) 
 

Value:

class tb : public dbTable { \
OOFILE_METHODS(tb)

#define OOFILE_METHODS tb   ) 
 

Value:

ABSTRACT_BASE_METHODS(tb) \
virtual dbTable* cloneTableConst(selSharingT selSharing) const {  \
    assert(selSharing!=selCopyOnWrite || isTableValid()); \
    OOF_dbTableStatics::sCloningSelSharing = selSharing; \
    OOF_dbTableStatics::sCloning = true; \
    tb* ret = new tb(*this); \
    ret->postCloneTableCleanup(); \
    return ret; } \
virtual dbTable* cloneTable(selSharingT selSharing=selCopyOnWrite) {  \
    if (selSharing==selCopyOnWrite) \
        ensureSelectionLoaded(); \
    return cloneTableConst(selSharing); } \
tb* clone(selSharingT selSharing=selCopyOnWrite) const { return (tb*) cloneTableConst(selSharing); } \
tb* cloneEmptyInRAM() const {  \
    dbConnect_ram tempConnect; \
    OOF_dbTableStatics::sCloningInDifferentConnection = true; \
    tb* ret = new tb(*this); \
    tempConnect.newConnection(); \
    return ret; } \
tb* cloneInRAM() {  \
    tb* ret = cloneEmptyInRAM(); \
    ret->copyAllFrom(this); \
    return ret; }


Generated on Fri Jan 2 00:36:08 2004 for OOFILE by doxygen 1.3.5