57#ifndef _SO_NODEKIT_CATALOG
58#define _SO_NODEKIT_CATALOG
65#define SO_CATALOG_NAME_NOT_FOUND -1
66#define SO_CATALOG_THIS_PART_NUM 0
102 bool theNullByDefault,
103 const SbName &theParentName,
const SbName &theRightSiblingName,
104 bool theListPart,
SoType theListContainerType,
111 SoType newDefaultType )
const;
118 bool isLeaf()
const {
return leafPart; };
121 bool isList()
const {
return listPart; };
130 { nullByDefault = newNullByDefault; }
133 void setPublic(
bool newPublic ) { publicPart = newPublic; }
134 void setLeaf(
bool newLeafPart ) { leafPart = newLeafPart; }
139 { type = newType; defaultType = newDefaultType; }
242 bool theNullByDefault,
243 const SbName &theParentName,
244 const SbName &theRightSiblingName,
bool theListPart,
245 SoType theListContainerType,
281 static const SbName *emptyName;
290 bool checkName(
const SbName &theName );
291 bool checkNewName(
const SbName &theName );
292 bool checkNewTypes(
SoType theType,
294 bool checkAndGetParent(
const SbName &theName,
295 const SbName &theParentName,
297 bool checkAndGetSiblings(
const SbName &theParentName,
298 const SbName &theRightSiblingName,
301 bool checkCanTypesBeList(
SoType theType,
303 SoType theListContainerType );
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
This is a dictionary mapping (size_t) integer keys to (void *) data pointers.
Character string stored in a hash table.
an internal class that should be accessed only by an SoNodekitCatalog
void setRightSiblingName(const SbName &newN)
void setNullByDefault(bool newNullByDefault)
SoNodekitCatalogEntry * clone(SoType newType, SoType newDefaultType) const
const SbName & getParentName() const
const SoTypeList & getListItemTypes() const
SoNodekitCatalogEntry(const SbName &theName, SoType theType, SoType theDefaultType, bool theNullByDefault, const SbName &theParentName, const SbName &theRightSiblingName, bool theListPart, SoType theListContainerType, const SoTypeList &theListItemTypes, bool thePublicPart)
constructor
void setLeaf(bool newLeafPart)
SoType getListContainerType() const
void printCheck() const
prints the contents of this entry
bool isNullByDefault() const
const SbName & getRightSiblingName() const
void addListItemType(SoType typeToAdd)
For adding to the set of node types allowed beneath a list...
bool recursiveSearch(const SbName &nameToFind, SoTypeList *typesChecked) const
recursively search this entry for 'name to find' in the templates of this entry and its descendants
void setPublic(bool newPublic)
these should only by used by catalogs when an entry is given a new child or left sibling....
void setTypes(SoType newType, SoType newDefaultType)
This should only by used by catalogs when an entry is changing type and/or defaultType.
SoNodekitCatalogEntry * clone() const
clone exactly, or make a clone with a given type...
const SbName & getName() const
inquiry functions:
SoType getDefaultType() const
SoType getListContainerType(int thePartNumber) const
SoType getListContainerType(const SbName &theName) const
SoNodekitCatalog * clone(SoType typeOfThis) const
Make a new identical copy, but you must give the node type for 'this' (where 'this' is the top level ...
SoType getType(int thePartNumber) const
bool isNullByDefault(const SbName &theName) const
bool addEntry(const SbName &theName, SoType theType, SoType theDefaultType, bool theNullByDefault, const SbName &theParentName, const SbName &theRightSiblingName, bool theListPart, SoType theListContainerType, SoType theListItemType, bool thePublicPart)
Adding entries.
const SoTypeList & getListItemTypes(const SbName &theName) const
SoType getDefaultType(const SbName &theName) const
void addListItemType(const SbName &theName, SoType typeToAdd)
bool isList(int thePartNumber) const
SoType getDefaultType(int thePartNumber) const
int getNumEntries() const
Returns number of entries in the catalog.
bool recursiveSearch(int partNumber, const SbName &nameToFind, SoTypeList *typesChecked) const
used by SoNodekitParts to search through catalogs.
int getParentPartNumber(const SbName &theName) const
static void initClass()
Initializes this object.
bool isPublic(const SbName &theName) const
const SbName & getParentName(const SbName &theName) const
const SbName & getRightSiblingName(int thePartNumber) const
const SbName & getRightSiblingName(const SbName &theName) const
int getRightSiblingPartNumber(const SbName &theName) const
bool isNullByDefault(int thePartNumber) const
void printCheck() const
prints the contents of this catalog
bool isPublic(int thePartNumber) const
void addListItemType(int thePartNumber, SoType typeToAdd)
For adding to the set of node types allowed beneath a list...
~SoNodekitCatalog()
Destructor.
const SbName & getParentName(int thePartNumber) const
bool isList(const SbName &theName) const
const SoTypeList & getListItemTypes(int thePartNumber) const
SoType getType(const SbName &theName) const
void narrowTypes(const SbName &theName, SoType newType, SoType newDefaultType)
For changing the type and defaultType of an entry.
void setNullByDefault(const SbName &theName, bool newNullByDefault)
int getParentPartNumber(int thePartNumber) const
SoNodekitCatalog()
Catalogs are only constructed, destructed, cloned or added to by subclasses of SoBaseKit.
int getPartNumber(const SbName &theName) const
Given the name of a part, returns its part number in the catalog.
const SbName & getName(int thePartNumber) const
Given the part number of a part, returns its name in the catalog.
int getRightSiblingPartNumber(int thePartNumber) const
bool isLeaf(int thePartNumber) const
bool isLeaf(const SbName &theName) const
Maintains a list of SoTypes.
SoType has no virtual functions to keep it small...