Macros
runTimeSelectionTables.H File Reference

Macros to ease declaration of run-time selection tables. More...

Include dependency graph for runTimeSelectionTables.H:

Go to the source code of this file.

Macros

#define declareRunTimeSelectionTable(autoPtr, baseType, argNames, argList, parList)
 
#define declareRunTimeNewSelectionTable(autoPtr, baseType, argNames, argList, parList)
 
#define defineRunTimeSelectionTableConstructor(baseType, argNames)
 
#define defineRunTimeSelectionTableDestructor(baseType, argNames)
 
#define defineRunTimeSelectionTablePtr(baseType, argNames)
 
#define defineTemplateRunTimeSelectionTablePtr(baseType, argNames)
 
#define defineRunTimeSelectionTable(baseType, argNames)
 
#define defineTemplateRunTimeSelectionTable(baseType, argNames)
 
#define defineTemplatedRunTimeSelectionTableConstructor(baseType, argNames, Targ)
 
#define defineTemplatedRunTimeSelectionTableDestructor(baseType, argNames, Targ)
 
#define defineTemplatedRunTimeSelectionTablePtr(baseType, argNames, Targ)
 
#define defineTemplatedRunTimeSelectionTable(baseType, argNames, Targ)
 

Detailed Description

Macros to ease declaration of run-time selection tables.

Original source file runTimeSelectionTables.H

declareRunTimeSelectionTable is used to create a run-time selection table for a base-class which holds constructor pointers on the table.

declareRunTimeNewSelectionTable is used to create a run-time selection table for a derived-class which holds "New" pointers on the table.

Definition in file runTimeSelectionTables.H.

Macro Definition Documentation

◆ declareRunTimeSelectionTable

#define declareRunTimeSelectionTable (   autoPtr,
  baseType,
  argNames,
  argList,
  parList 
)

Definition at line 49 of file runTimeSelectionTables.H.

◆ declareRunTimeNewSelectionTable

#define declareRunTimeNewSelectionTable (   autoPtr,
  baseType,
  argNames,
  argList,
  parList 
)

Definition at line 140 of file runTimeSelectionTables.H.

◆ defineRunTimeSelectionTableConstructor

#define defineRunTimeSelectionTableConstructor (   baseType,
  argNames 
)
Value:
\
/* Table constructor called from the table add function */ \
void baseType::construct##argNames##ConstructorTables() \
{ \
static bool constructed = false; \
if (!constructed) \
{ \
constructed = true; \
baseType::argNames##ConstructorTablePtr_ \
= new baseType::argNames##ConstructorTable; \
} \
}

Definition at line 239 of file runTimeSelectionTables.H.

◆ defineRunTimeSelectionTableDestructor

#define defineRunTimeSelectionTableDestructor (   baseType,
  argNames 
)
Value:
\
/* Table destructor called from the table add function destructor */ \
void baseType::destroy##argNames##ConstructorTables() \
{ \
if (baseType::argNames##ConstructorTablePtr_) \
{ \
delete baseType::argNames##ConstructorTablePtr_; \
baseType::argNames##ConstructorTablePtr_ = NULL; \
} \
}

Definition at line 257 of file runTimeSelectionTables.H.

◆ defineRunTimeSelectionTablePtr

#define defineRunTimeSelectionTablePtr (   baseType,
  argNames 
)
Value:
\
/* Define the constructor function table */ \
baseType::argNames##ConstructorTable* \
baseType::argNames##ConstructorTablePtr_ = NULL

Definition at line 273 of file runTimeSelectionTables.H.

◆ defineTemplateRunTimeSelectionTablePtr

#define defineTemplateRunTimeSelectionTablePtr (   baseType,
  argNames 
)
Value:
\
/* Define the constructor function table */ \
typename baseType::argNames##ConstructorTable* \
baseType::argNames##ConstructorTablePtr_ = NULL

Definition at line 282 of file runTimeSelectionTables.H.

◆ defineRunTimeSelectionTable

#define defineRunTimeSelectionTable (   baseType,
  argNames 
)
Value:
\
defineRunTimeSelectionTablePtr(baseType,argNames); \
defineRunTimeSelectionTableConstructor(baseType,argNames); \
defineRunTimeSelectionTableDestructor(baseType,argNames)

Definition at line 295 of file runTimeSelectionTables.H.

◆ defineTemplateRunTimeSelectionTable

#define defineTemplateRunTimeSelectionTable (   baseType,
  argNames 
)

◆ defineTemplatedRunTimeSelectionTableConstructor

#define defineTemplatedRunTimeSelectionTableConstructor (   baseType,
  argNames,
  Targ 
)
Value:
\
/* Table constructor called from the table add function */ \
void baseType< Targ >::construct##argNames##ConstructorTables() \
{ \
static bool constructed = false; \
if (!constructed) \
{ \
constructed = true; \
baseType< Targ >::argNames##ConstructorTablePtr_ \
= new baseType< Targ >::argNames##ConstructorTable; \
} \
}

Definition at line 324 of file runTimeSelectionTables.H.

◆ defineTemplatedRunTimeSelectionTableDestructor

#define defineTemplatedRunTimeSelectionTableDestructor (   baseType,
  argNames,
  Targ 
)
Value:
\
/* Table destructor called from the table add function destructor */ \
void baseType< Targ >::destroy##argNames##ConstructorTables() \
{ \
if (baseType< Targ >::argNames##ConstructorTablePtr_) \
{ \
delete baseType< Targ >::argNames##ConstructorTablePtr_; \
baseType< Targ >::argNames##ConstructorTablePtr_ = NULL; \
} \
}

Definition at line 343 of file runTimeSelectionTables.H.

◆ defineTemplatedRunTimeSelectionTablePtr

#define defineTemplatedRunTimeSelectionTablePtr (   baseType,
  argNames,
  Targ 
)
Value:
\
/* Define the constructor function table */ \
baseType< Targ >::argNames##ConstructorTable* \
baseType< Targ >::argNames##ConstructorTablePtr_ = NULL

Definition at line 360 of file runTimeSelectionTables.H.

◆ defineTemplatedRunTimeSelectionTable

#define defineTemplatedRunTimeSelectionTable (   baseType,
  argNames,
  Targ 
)
defineRunTimeSelectionTableDestructor
#define defineRunTimeSelectionTableDestructor(baseType, argNames)
Definition: runTimeSelectionTables.H:257
defineTemplatedRunTimeSelectionTableDestructor
#define defineTemplatedRunTimeSelectionTableDestructor(baseType, argNames, Targ)
Definition: runTimeSelectionTables.H:343
defineRunTimeSelectionTableConstructor
#define defineRunTimeSelectionTableConstructor(baseType, argNames)
Definition: runTimeSelectionTables.H:239
defineRunTimeSelectionTablePtr
#define defineRunTimeSelectionTablePtr(baseType, argNames)
Definition: runTimeSelectionTables.H:273
defineTemplatedRunTimeSelectionTableConstructor
#define defineTemplatedRunTimeSelectionTableConstructor(baseType, argNames, Targ)
Definition: runTimeSelectionTables.H:324
defineTemplatedRunTimeSelectionTablePtr
#define defineTemplatedRunTimeSelectionTablePtr(baseType, argNames, Targ)
Definition: runTimeSelectionTables.H:360