SYNOPSIS

#include <Inventor/nodekits/SoNodekitCatalog.h>

Public Member Functions

SoNodekitCatalog (void)

~SoNodekitCatalog ()

int getNumEntries (void) const

int getPartNumber (const SbName &name) const

const SbName & getName (int part) const

SoType getType (int part) const

SoType getType (const SbName &name) const

SoType getDefaultType (int part) const

SoType getDefaultType (const SbName &name) const

SbBool isNullByDefault (int part) const

SbBool isNullByDefault (const SbName &name) const

SbBool isLeaf (int part) const

SbBool isLeaf (const SbName &name) const

const SbName & getParentName (int part) const

const SbName & getParentName (const SbName &name) const

int getParentPartNumber (int part) const

int getParentPartNumber (const SbName &name) const

const SbName & getRightSiblingName (int part) const

const SbName & getRightSiblingName (const SbName &name) const

int getRightSiblingPartNumber (int part) const

int getRightSiblingPartNumber (const SbName &name) const

SbBool isList (int part) const

SbBool isList (const SbName &name) const

SoType getListContainerType (int part) const

SoType getListContainerType (const SbName &name) const

const SoTypeList & getListItemTypes (int part) const

const SoTypeList & getListItemTypes (const SbName &name) const

SbBool isPublic (int part) const

SbBool isPublic (const SbName &name) const

SoNodekitCatalog * clone (SoType type) const

SbBool addEntry (const SbName &name, SoType type, SoType defaulttype, SbBool isdefaultnull, const SbName &parent, const SbName &rightsibling, SbBool islist, SoType listcontainertype, SoType listitemtype, SbBool ispublic)

void addListItemType (int part, SoType type)

void addListItemType (const SbName &name, SoType type)

void narrowTypes (const SbName &name, SoType newtype, SoType newdefaulttype)

void setNullByDefault (const SbName &name, SbBool nullbydefault)

SbBool recursiveSearch (int part, const SbName &name, SoTypeList *checked) const

void printCheck (void) const

Static Public Member Functions

static void initClass (void)

Detailed Description

The SoNodekitCatalog class is a container for nodekit layouts.

Nodekits store all their hierarchical layout information and part information in instances of this class.

See also:

SoNodeKit, SoBaseKit

Constructor & Destructor Documentation

SoNodekitCatalog::SoNodekitCatalog (void)

Constructor.

SoNodekitCatalog::~SoNodekitCatalog ()

Destructor.

Member Function Documentation

void SoNodekitCatalog::initClass (void)\fC [static]\fP

Initialization of static variables.

int SoNodekitCatalog::getNumEntries (void) const

Returns total number of entries in the catalog.

int SoNodekitCatalog::getPartNumber (const \fBSbName\fP &name) const

Returns part number in catalog with name. If no part exists with name, returns SO_CATALOG_NAME_NOT_FOUND.

const \fBSbName\fP & SoNodekitCatalog::getName (intpart) const

Given the part number, return name of that part.

\fBSoType\fP SoNodekitCatalog::getType (intpart) const

Given the part number, return type.

\fBSoType\fP SoNodekitCatalog::getType (const \fBSbName\fP &name) const

Given the part name, return type.

\fBSoType\fP SoNodekitCatalog::getDefaultType (intpart) const

Given part number, return default type of part.

\fBSoType\fP SoNodekitCatalog::getDefaultType (const \fBSbName\fP &name) const

Given part name, return default type of part.

SbBool SoNodekitCatalog::isNullByDefault (intpart) const

Returns TRUE if the part is empty by default, otherwise FALSE.

SbBool SoNodekitCatalog::isNullByDefault (const \fBSbName\fP &name) const

Returns TRUE if part name is empty by default, otherwise FALSE.

SbBool SoNodekitCatalog::isLeaf (intpart) const

Returns TRUE if the part is not a parent for any other parts in the nodekit catalog.

SbBool SoNodekitCatalog::isLeaf (const \fBSbName\fP &name) const

Returns TRUE if the part name is not a parent for any other parts in the nodekit catalog.

const \fBSbName\fP & SoNodekitCatalog::getParentName (intpart) const

Returns name of parent of part. If part doesn't have a parent, the empty string is returned.

const \fBSbName\fP & SoNodekitCatalog::getParentName (const \fBSbName\fP &name) const

Returns name of parent of the part. If name doesn't have a parent, the empty string is returned.

int SoNodekitCatalog::getParentPartNumber (intpart) const

Returns part number of given part's parent. If part doesn't have a parent, SO_CATALOG_NAME_NOT_FOUND is returned.

int SoNodekitCatalog::getParentPartNumber (const \fBSbName\fP &name) const

Returns part number of given part's parent. If name doesn't have a parent, SO_CATALOG_NAME_NOT_FOUND is returned.

const \fBSbName\fP & SoNodekitCatalog::getRightSiblingName (intpart) const

Returns name of right sibling of part. Returns the empty string if part doesn't have a right sibling.

const \fBSbName\fP & SoNodekitCatalog::getRightSiblingName (const \fBSbName\fP &name) const

Returns name of sibling of the part. Returns the empty string if name doesn't have a right sibling.

int SoNodekitCatalog::getRightSiblingPartNumber (intpart) const

Returns part number of given part's sibling. Returns SO_CATALOG_NAME_NOT_FOUND if part doesn't have a right sibling.

int SoNodekitCatalog::getRightSiblingPartNumber (const \fBSbName\fP &name) const

Returns part number of given part's right sibling. Returns SO_CATALOG_NAME_NOT_FOUND if part doesn't have a right sibling.

SbBool SoNodekitCatalog::isList (intpart) const

Returns TRUE if the given part is a list container.

SbBool SoNodekitCatalog::isList (const \fBSbName\fP &name) const

Returns TRUE if the given part is a list container.

\fBSoType\fP SoNodekitCatalog::getListContainerType (intpart) const

Returns type of list container (SoGroup, SoSeparator, SoSwitch, etc) which part is.

\fBSoType\fP SoNodekitCatalog::getListContainerType (const \fBSbName\fP &name) const

Returns type of list container (SoGroup, SoSeparator, SoSwitch, etc) which the named part is.

const \fBSoTypeList\fP & SoNodekitCatalog::getListItemTypes (intpart) const

Returns list of node types which are allowed to be children of the list container part.

const \fBSoTypeList\fP & SoNodekitCatalog::getListItemTypes (const \fBSbName\fP &name) const

Returns list of node types which are allowed to be children of the named list container part.

SbBool SoNodekitCatalog::isPublic (intpart) const

Returns TRUE if part is visible and publicly available for queries and modifications, FALSE if part is hidden.

SbBool SoNodekitCatalog::isPublic (const \fBSbName\fP &name) const

Returns TRUE if the part is visible and publicly available for queries and modifications, FALSE if it is hidden.

\fBSoNodekitCatalog\fP * SoNodekitCatalog::clone (\fBSoType\fPtype) const

Return a clone of this catalog. type will be used to set the type and defaulttype values of the toplevel this entry.

SbBool SoNodekitCatalog::addEntry (const \fBSbName\fP &name, \fBSoType\fPtype, \fBSoType\fPdefaulttype, SbBoolisdefaultnull, const \fBSbName\fP &parentname, const \fBSbName\fP &rightsiblingname, SbBoolislist, \fBSoType\fPlistcontainertype, \fBSoType\fPlistitemtype, SbBoolispublic)

Add a new entry to the catalog. Returns TRUE if add was ok.

void SoNodekitCatalog::addListItemType (intpart, \fBSoType\fPtype)

Add another allowable type for the given part. part must of course be a list container item.

void SoNodekitCatalog::addListItemType (const \fBSbName\fP &name, \fBSoType\fPtype)

Add another allowable type for the name part. The part must of course be a list container.

void SoNodekitCatalog::narrowTypes (const \fBSbName\fP &name, \fBSoType\fPnewtype, \fBSoType\fPnewdefaulttype)

Set the type and default type of a part to be subtypes of the old types. Useful for 'narrowing' the specification of a nodekit which inherits the catalog of a more generic nodekit superclass.

void SoNodekitCatalog::setNullByDefault (const \fBSbName\fP &name, SbBoolnullbydefault)

Change whether or not the part with the given name is created by default.

SbBool SoNodekitCatalog::recursiveSearch (intpart, const \fBSbName\fP &name, \fBSoTypeList\fP *checked) const

Recursively search part number in catalog for the name part.

The checked SoTypeList is just used as a placeholder to remember which nodekit class catalogs have already been scanned (or are being scanned) during the recursion. You should normally just pass in an empty list.

void SoNodekitCatalog::printCheck (void) const

Lists all catalog parts, which is useful for debugging.

Author

Generated automatically by Doxygen for Coin from the source code.