Inventor/SoSubTypedClass.h File Reference

#include <Inventor/SoType.h>

Go to the source code of this file.

Defines

#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)

Define Documentation

 
#define SO_TYPED_CLASS_ABSTRACT_HEADER (  ) 
Value:
SO_TYPED_CLASS_ABSTRACT_INTERNAL_HEADER();                    \
public:                                                         \
  static void initClass();                                      \
  static void exitClass();
 
#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
#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_VARS ( className   ) 
Value:
SoType className::m_classTypeId;                              \
    SbBool className::m_isFirstTime = TRUE;
#define SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS ( className   ) 
Value:
SoType::removeType(m_classTypeId.getName());  \
  m_classTypeId = SoType::badType();  \
  m_isFirstTime = TRUE;
#define SO_TYPED_CLASS_EXIT_CLASS ( className   )     SO_TYPED_CLASS_EXIT_ABSTRACT_CLASS(className)
 
#define SO_TYPED_CLASS_HEADER (  ) 
Value:
SO_TYPED_CLASS_INTERNAL_HEADER();                             \
public:                                                         \
  static void initClass();                                      \
  static void exitClass()
#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 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;                                            \
  }
 
#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
#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);                                     \
  }
#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_VARS ( className   )     SO_TYPED_CLASS_ABSTRACT_VARS(className)

Open Inventor Toolkit reference manual, generated on 1 Nov 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/