Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoSubTypedClass.h File Reference
#include <Inventor/SoType.h>

Go to the source code of this file.

Macros

#define SO_TYPED_CLASS_INTERNAL_HEADER()
 
#define SO_TYPED_CLASS_HEADER()
 
#define SO_TYPED_CLASS_ABSTRACT_VARS(className)
 
#define SO_TYPED_CLASS_VARS(className)    SO_TYPED_CLASS_ABSTRACT_VARS(className)
 
#define SO_TYPED_CLASS_INTERNAL_SOURCE(parent, className, classPrintName)
 
#define SO_TYPED_CLASS_SOURCE(parentClass, className, classPrintName)
 
#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_SOURCE(className)    SO_TYPED_CLASS_ABSTRACT_VARS(className)
 
#define SO_TYPED_CLASS_ABSTRACT_SOURCE(className, classPrintName, parentClass)
 
#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_HEADER()
 
#define SO_TYPED_CLASS_ABSTRACT_HEADER()
 
#define SO_TYPED_CLASS_INIT_ABSTRACT_CLASS(className, classPrintName, parentClass)
 
#define SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS(className)
 
#define SO_TYPED_CLASS_INIT_CLASS(className, classPrintName, parentClass)
 
#define SO_TYPED_CLASS_EXIT_CLASS(className)    SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS(className)
 

Macro Definition Documentation

◆ SO_TYPED_CLASS_ABSTRACT_HEADER

#define SO_TYPED_CLASS_ABSTRACT_HEADER ( )
Value:
public: \
static void initClass(); \
static void exitClass();
#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_HEADER()

Definition at line 116 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_ABSTRACT_INTERNAL_HEADER

#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_HEADER ( )
Value:
public: \
virtual SoType getTypeId() const = 0; \
static SoType getClassTypeId() { return m_classTypeId; } \
\
private: \
static SoType m_classTypeId; \
static SbBool m_isFirstTime
virtual SoType getTypeId() const
Returns the type identifier for this specific instance.
Stores runtime type information.
Definition SoType.h:98
int SbBool
Boolean type.
Definition SbBase.h:87

Definition at line 107 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_ABSTRACT_INTERNAL_SOURCE

#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_SOURCE (   className)     SO_TYPED_CLASS_ABSTRACT_VARS(className)

Definition at line 90 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_ABSTRACT_SOURCE

#define SO_TYPED_CLASS_ABSTRACT_SOURCE (   className,
  classPrintName,
  parentClass 
)
Value:
void \
className::initClass() \
{ \
SO_TYPED_CLASS_INIT_ABSTRACT_CLASS(className, classPrintName, parentClass) \
} \
\
void \
className::exitClass() \
{ \
SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS(className) \
}
#define SO_TYPED_CLASS_ABSTRACT_INTERNAL_SOURCE(className)

Definition at line 93 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_ABSTRACT_VARS

#define SO_TYPED_CLASS_ABSTRACT_VARS (   className)
Value:
SoType className::m_classTypeId; \
SbBool className::m_isFirstTime = TRUE;
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77

Definition at line 44 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS

#define SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS (   className)
Value:
SoType::removeType(m_classTypeId.getName()); \
m_classTypeId = SoType::badType(); \
m_isFirstTime = TRUE;
static SoType badType()
Returns an always-illegal type.
Definition SoType.h:124

Definition at line 133 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_EXIT_CLASS

#define SO_TYPED_CLASS_EXIT_CLASS (   className)     SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS(className)

Definition at line 149 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_HEADER

#define SO_TYPED_CLASS_HEADER ( )
Value:
public: \
static void initClass(); \
static void exitClass()
#define SO_TYPED_CLASS_INTERNAL_HEADER()

Definition at line 38 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_INIT_ABSTRACT_CLASS

#define SO_TYPED_CLASS_INIT_ABSTRACT_CLASS (   className,
  classPrintName,
  parentClass 
)
Value:
if (m_isFirstTime) \
{ \
if (parentClass::getClassTypeId() == SoType::badType() ) \
parentClass::initClass(); \
m_classTypeId = SoType::createType(parentClass::getClassTypeId(), \
classPrintName, \
NULL); \
m_isFirstTime = FALSE; \
}
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75

Definition at line 122 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_INIT_CLASS

#define SO_TYPED_CLASS_INIT_CLASS (   className,
  classPrintName,
  parentClass 
)
Value:
if (m_isFirstTime) \
{ \
if (parentClass::getClassTypeId() == SoType::badType() ) \
parentClass::initClass(); \
m_classTypeId = SoType::createType(parentClass::getClassTypeId(), \
classPrintName, \
&className::createFromSoType); \
m_isFirstTime = FALSE; \
}

Definition at line 138 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_INTERNAL_HEADER

#define SO_TYPED_CLASS_INTERNAL_HEADER ( )
Value:
public: \
SoType getTypeId() const; \
static SoType getClassTypeId(); \
static void *createFromSoType(SoType* dynamicType = NULL); \
private: \
static SoType m_classTypeId; \
static SbBool m_isFirstTime

Definition at line 29 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_INTERNAL_SOURCE

#define SO_TYPED_CLASS_INTERNAL_SOURCE (   parent,
  className,
  classPrintName 
)
Value:
\
SO_TYPED_CLASS_ABSTRACT_VARS(className) \
\
SoType \
className::getTypeId() const \
{ \
return m_classTypeId; \
} \
\
SoType \
className::getClassTypeId() \
{ \
return m_classTypeId; \
} \
\
void * \
className::createFromSoType(SoType*) \
{ \
return (void *)(new className); \
}

Definition at line 53 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_SOURCE

#define SO_TYPED_CLASS_SOURCE (   parentClass,
  className,
  classPrintName 
)
Value:
SO_TYPED_CLASS_INTERNAL_SOURCE(parentClass,className,classPrintName) \
\
void \
className::initClass() \
{ \
SO_TYPED_CLASS_INIT_CLASS(className,classPrintName,parentClass) \
} \
\
void \
className::exitClass() \
{ \
SO_TYPED_CLASS_EXIT_CLASS(className) \
}
#define SO_TYPED_CLASS_INTERNAL_SOURCE(parent, className, classPrintName)

Definition at line 75 of file SoSubTypedClass.h.

◆ SO_TYPED_CLASS_VARS

#define SO_TYPED_CLASS_VARS (   className)     SO_TYPED_CLASS_ABSTRACT_VARS(className)

Definition at line 50 of file SoSubTypedClass.h.