56#include <Inventor/STL/ostream>
60class ScDataInputStream;
64#ifndef HIDDEN_FROM_DOC
66#define SO_BAD_TYPE_INT_INTERNAL 0x80000000
101# pragma __nondynamic_class
126 return (
SoType)SO_BAD_TYPE_INT_INTERNAL;
144 template<
typename TypedObjectClass>
201 return os <<
"<" << t.
getName() <<
"," << t.getKey() <<
">";
211 void * (*createMethod)(
SoType *) = NULL,
220 void * (*createMethod)(
SoType *) = NULL);
227 SoType() { storage.intValue = SO_BAD_TYPE_INT_INTERNAL; }
229 SoType(
unsigned int storageValue) { storage.intValue = storageValue; }
233 static void finish();
236 static int maxKey() {
return nextIndex; }
239 short getData()
const;
242 short getKey()
const;
247 bool isInternal()
const;
251 static int getNumTypes();
254 static SbName getTypeName(
const short key);
256 inline unsigned int getStorageValue()
const {
return storage.intValue; }
291 static SbDict *nameDict;
294 static int nextIndex;
295 static int arraySize;
296 static SoTypeData *typeData;
298 static void expandTypeData();
299 static SoType fromNameExt(
const SbName &name,
bool extent);
302 static void *unknownNameData;
virtual SoGLGraphicDevice::DeviceType getType()=0
Returns the type of device.
void * SoTypeFromNameCB(SbName name)
Character string stored in a hash table.
Stores runtime type information.
friend std::ostream & operator<<(std::ostream &os, const SoType &t)
Writes the SoType to the specified output stream.
SbBool isBad() const
Returns TRUE if the type is a bad type.
SbBool isDerivedFrom() const
Returns TRUE if the type is derived from the type of class TypedObjectClass.
SbBool canCreateInstance() const
Some types are able to create instances; for example, most nodes and engines (those which are not abs...
void * createInstance(SoType *overrideType=NULL) const
Creates and returns a pointer to an instance of the type.
static int getAllDerivedFrom(const SoType &type, SoTypeList &list)
Adds all types derived from the given type to the given type list.
bool operator!=(const SoType t) const
Returns TRUE if this type is not the same as the given type.
static SoType badType()
Returns an always-illegal type.
SbName getName() const
Returns the name associated with a type.
bool operator<(const SoType t) const
Less-than comparison operator that can be used to sort types.
SbBool isDerivedFrom(const SoType &t) const
Returns TRUE if the type is derived from type t.
struct SoType::@11::@12 storageStruct
SoType getParent() const
Returns the type of the parent class.
bool operator==(const SoType t) const
Returns TRUE if this type is the same as the given type.
static SoType fromName(const SbName &name)
Returns the type associated with the given name.
Maintains a list of SoTypes.