Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoSubEngine.h File Reference

Go to the source code of this file.

Macros

#define SO__ENGINE_CHECK_INIT(className)
 
#define SO__ENGINE_CHECK_CONSTRUCT(where)
 
#define SO_ENGINE_ABSTRACT_HEADER(className)
 
#define SO_ENGINE_HEADER(className)
 
#define SO__ENGINE_ABSTRACT_VARS(className)
 
#define SO__ENGINE_VARS(className)    SO__ENGINE_ABSTRACT_VARS(className)
 
#define SO__ENGINE_ABSTRACT_METHODS(className)
 
#define SO__ENGINE_METHODS(className)
 
#define SO_ENGINE_SOURCE(className)
 
#define SO_ENGINE_ABSTRACT_SOURCE(className)
 
#define SO_ENGINE_INIT_CLASS_CHECK_PARENT(className, parentClass)
 
#define SO__ENGINE_INIT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__ENGINE_INIT_CLASS(className, classPrintName, parentClass)    SO__ENGINE_INIT_CLASS_INTERNAL(className, classPrintName, parentClass);
 
#define SO__ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className, classPrintName, parentClass)
 
#define SO__ENGINE_INIT_ABSTRACT_CLASS(className, classPrintName, parent)    SO__ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parent);
 
#define SO_ENGINE_INIT_CLASS_INTERNAL(className, parentClass, parentPrintClass)
 
#define SO_ENGINE_INIT_CLASS(className, parentClass, parentPrintClass)    SO_ENGINE_INIT_CLASS_INTERNAL(className,parentClass,parentPrintClass);
 
#define SO_ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className, parentClass, parentPrintClass)
 
#define SO_ENGINE_INIT_ABSTRACT_CLASS(className, parent, parentPrintClass)    SO_ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className,parent,parentPrintClass);
 
#define SO_ENGINE_EXIT_CLASS(className)
 
#define SO_ENGINE_CONSTRUCTOR(className)
 
#define SO_ENGINE_IS_FIRST_INSTANCE()   (firstInstance == TRUE)
 
#define SO_ENGINE_ADD_INPUT(inputName, defValue)
 
#define SO_ENGINE_ADD_OUTPUT(outputName, type)
 
#define SO_ENGINE_DEFINE_ENUM_VALUE(enumType, enumValue)
 
#define SO_ENGINE_OUTPUT(outputName, type, code)
 

Macro Definition Documentation

◆ SO__ENGINE_ABSTRACT_METHODS

#define SO__ENGINE_ABSTRACT_METHODS (   className)

Definition at line 167 of file SoSubEngine.h.

◆ SO__ENGINE_ABSTRACT_VARS

#define SO__ENGINE_ABSTRACT_VARS (   className)
Value:
SoType className::classTypeId; \
SbBool className::isBuiltIn = FALSE; \
SbBool className::firstInstance = TRUE; \
SoEngineOutputData *className::outputData = NULL; \
SoFieldData * className::inputData = NULL; \
const SoEngineOutputData **className::parentOutputData = NULL; \
const SoFieldData ** className::parentInputData = NULL
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
SoFieldData(const SoFieldData *)
SoEngineOutputData(int numOutputs)
Stores runtime type information.
Definition SoType.h:98
int SbBool
Boolean type.
Definition SbBase.h:87

Definition at line 150 of file SoSubEngine.h.

◆ SO__ENGINE_CHECK_CONSTRUCT

#define SO__ENGINE_CHECK_CONSTRUCT (   where)
Value:
if (inputData == NULL) { \
inputData = new SoFieldData(parentInputData ? *parentInputData : NULL); \
outputData = new SoEngineOutputData(parentOutputData ? *parentOutputData : NULL); \
}

Definition at line 95 of file SoSubEngine.h.

◆ SO__ENGINE_CHECK_INIT

#define SO__ENGINE_CHECK_INIT (   className)
Value:
if (classTypeId.isBad()) { \
className::initClass(); \
}

Definition at line 90 of file SoSubEngine.h.

◆ SO__ENGINE_INIT_ABSTRACT_CLASS

#define SO__ENGINE_INIT_ABSTRACT_CLASS (   className,
  classPrintName,
  parent 
)     SO__ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className,classPrintName,parent);

Definition at line 270 of file SoSubEngine.h.

◆ SO__ENGINE_INIT_ABSTRACT_CLASS_INTERNAL

#define SO__ENGINE_INIT_ABSTRACT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
{ \
SO_ENGINE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType(parentClass::getClassTypeId(), \
classPrintName); \
parentInputData = parentClass::getInputDataPtr(); \
parentOutputData = parentClass::getOutputDataPtr(); \
}

Definition at line 262 of file SoSubEngine.h.

◆ SO__ENGINE_INIT_CLASS

#define SO__ENGINE_INIT_CLASS (   className,
  classPrintName,
  parentClass 
)     SO__ENGINE_INIT_CLASS_INTERNAL(className, classPrintName, parentClass);

Definition at line 259 of file SoSubEngine.h.

◆ SO__ENGINE_INIT_CLASS_INTERNAL

#define SO__ENGINE_INIT_CLASS_INTERNAL (   className,
  classPrintName,
  parentClass 
)
Value:
{ \
SO_ENGINE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType( parentClass::getClassTypeId(), \
classPrintName, \
&className::createInstance); \
parentInputData = parentClass::getInputDataPtr(); \
parentOutputData = parentClass::getOutputDataPtr(); \
}

Definition at line 250 of file SoSubEngine.h.

◆ SO__ENGINE_METHODS

#define SO__ENGINE_METHODS (   className)
Value:
\
SO__ENGINE_ABSTRACT_METHODS(className) \
\
void * \
className::createInstance(SoType* ) \
{ \
return (void *)(new className); \
}

Definition at line 207 of file SoSubEngine.h.

◆ SO__ENGINE_VARS

#define SO__ENGINE_VARS (   className)     SO__ENGINE_ABSTRACT_VARS(className)

Definition at line 159 of file SoSubEngine.h.

◆ SO_ENGINE_ABSTRACT_HEADER

#define SO_ENGINE_ABSTRACT_HEADER (   className)
Value:
public: \ \
static SoType getClassTypeId(); \ \
virtual SoType getTypeId() const; \
private: \
virtual SbBool getIsBuiltIn() const; \ \
virtual const SoFieldData * getFieldData() const; \ \
virtual const SoEngineOutputData * getOutputData() const; \
private: \
static const SoFieldData ** getInputDataPtr(); \
static const SoEngineOutputData ** getOutputDataPtr(); \
private: \
static SoType classTypeId; /* Type id */ \
static SbBool isBuiltIn; \
static SbBool firstInstance; /* True for first ctor call */ \
static SoFieldData *inputData; /* Info on input fields */ \
static SoEngineOutputData *outputData; /* Info on outputs */ \
static const SoFieldData **parentInputData; /* parent's fields */ \
static const SoEngineOutputData **parentOutputData
virtual SoType getTypeId() const
Returns the type identifier for this specific instance.

Definition at line 113 of file SoSubEngine.h.

◆ SO_ENGINE_ABSTRACT_SOURCE

#define SO_ENGINE_ABSTRACT_SOURCE (   className)
Value:
SO__ENGINE_ABSTRACT_METHODS(className)
#define SO__ENGINE_ABSTRACT_VARS(className)

Definition at line 226 of file SoSubEngine.h.

◆ SO_ENGINE_ADD_INPUT

#define SO_ENGINE_ADD_INPUT (   inputName,
  defValue 
)
Value:
{ \
SO__ENGINE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
inputData->addField(this, SO__QUOTE(inputName), \
&this->inputName); \
this->inputName.setValue defValue; \
this->inputName.setContainer(this); \
}

Definition at line 360 of file SoSubEngine.h.

◆ SO_ENGINE_ADD_OUTPUT

#define SO_ENGINE_ADD_OUTPUT (   outputName,
  type 
)
Value:
{ \
SO__ENGINE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
outputData->addOutput(this, SO__QUOTE(outputName), \
&this->outputName, \
type::getClassTypeId()); \
this->outputName.setContainer(this); \
}

Definition at line 387 of file SoSubEngine.h.

◆ SO_ENGINE_CONSTRUCTOR

#define SO_ENGINE_CONSTRUCTOR (   className)
Value:
SoBaseInitializer sbi(this); \
SO__ENGINE_CHECK_INIT(className); \
if (inputData == NULL) { \
inputData = new SoFieldData(parentInputData ? *parentInputData : NULL); \
outputData = new SoEngineOutputData(parentOutputData ? *parentOutputData : NULL); \
} \
else { \
firstInstance = FALSE; \
}

Definition at line 324 of file SoSubEngine.h.

◆ SO_ENGINE_DEFINE_ENUM_VALUE

#define SO_ENGINE_DEFINE_ENUM_VALUE (   enumType,
  enumValue 
)
Value:
{ \
SO__ENGINE_CHECK_CONSTRUCT(__FILE__); \
if (firstInstance) \
inputData->addEnumValue(SO__QUOTE(enumType), \
SO__QUOTE(enumValue), enumValue); \
}

Definition at line 419 of file SoSubEngine.h.

◆ SO_ENGINE_EXIT_CLASS

#define SO_ENGINE_EXIT_CLASS (   className)
Value:
SoType::removeType(classTypeId.getName()); \
classTypeId = SoType::badType(); \
if (inputData) \
{ \
delete inputData; \
inputData = NULL;\
} \
if (outputData) \
{ \
delete outputData;\
outputData = NULL; \
}\
firstInstance = TRUE
static SoType badType()
Returns an always-illegal type.
Definition SoType.h:124

Definition at line 304 of file SoSubEngine.h.

◆ SO_ENGINE_HEADER

#define SO_ENGINE_HEADER (   className)
Value:
\
SO_ENGINE_ABSTRACT_HEADER(className); \
\
private: \
/* Creates and returns instance */ \
static void *createInstance(SoType* dynamicType = NULL)

Definition at line 137 of file SoSubEngine.h.

◆ SO_ENGINE_INIT_ABSTRACT_CLASS

#define SO_ENGINE_INIT_ABSTRACT_CLASS (   className,
  parent,
  parentPrintClass 
)     SO_ENGINE_INIT_ABSTRACT_CLASS_INTERNAL(className,parent,parentPrintClass);

Definition at line 300 of file SoSubEngine.h.

◆ SO_ENGINE_INIT_ABSTRACT_CLASS_INTERNAL

#define SO_ENGINE_INIT_ABSTRACT_CLASS_INTERNAL (   className,
  parentClass,
  parentPrintClass 
)
Value:
{ \
SO_ENGINE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType(SoType::fromName(parentPrintClass), \
SO__QUOTE(className)); \
parentInputData = parentClass::getInputDataPtr(); \
parentOutputData = parentClass::getOutputDataPtr(); \
}
static SoType fromName(const SbName &name)
Returns the type associated with the given name.

Definition at line 292 of file SoSubEngine.h.

◆ SO_ENGINE_INIT_CLASS

#define SO_ENGINE_INIT_CLASS (   className,
  parentClass,
  parentPrintClass 
)     SO_ENGINE_INIT_CLASS_INTERNAL(className,parentClass,parentPrintClass);

Definition at line 289 of file SoSubEngine.h.

◆ SO_ENGINE_INIT_CLASS_CHECK_PARENT

#define SO_ENGINE_INIT_CLASS_CHECK_PARENT (   className,
  parentClass 
)
Value:
if (parentClass::getClassTypeId().isBad()) \
parentClass::initClass()

Definition at line 240 of file SoSubEngine.h.

◆ SO_ENGINE_INIT_CLASS_INTERNAL

#define SO_ENGINE_INIT_CLASS_INTERNAL (   className,
  parentClass,
  parentPrintClass 
)
Value:
{ \
SO_ENGINE_INIT_CLASS_CHECK_PARENT(className, parentClass); \
classTypeId = SoType::createType(SoType::fromName(parentPrintClass), \
SO__QUOTE(className), \
&className::createInstance); \
parentInputData = parentClass::getInputDataPtr(); \
parentOutputData = parentClass::getOutputDataPtr(); \
}

Definition at line 280 of file SoSubEngine.h.

◆ SO_ENGINE_IS_FIRST_INSTANCE

#define SO_ENGINE_IS_FIRST_INSTANCE ( )    (firstInstance == TRUE)

Definition at line 341 of file SoSubEngine.h.

◆ SO_ENGINE_OUTPUT

#define SO_ENGINE_OUTPUT (   outputName,
  type,
  code 
)
Value:
{ \
if (outputName.isEnabled()) { \
for (int _eng_out_i = 0; \
_eng_out_i < outputName.getNumConnections(); \
_eng_out_i++) { \
type *_eng_out_temp = (type *) outputName[_eng_out_i]; \
if (!_eng_out_temp->isReadOnly()) { \
_eng_out_temp->code; \
} \
} \
} \
}

Definition at line 433 of file SoSubEngine.h.

◆ SO_ENGINE_SOURCE

#define SO_ENGINE_SOURCE (   className)
Value:
SO__ENGINE_METHODS(className)
#define SO__ENGINE_VARS(className)

Definition at line 222 of file SoSubEngine.h.