![]() |
http://www.sim.no http://www.coin3d.org |
The SoNodekitCatalog class is a container for nodekit layouts. More...
#include <Inventor/nodekits/SoNodekitCatalog.h>
Static Public Member Functions | |
static void | initClass (void) |
The SoNodekitCatalog class is a container for nodekit layouts.
Nodekits store all their hierarchical layout information and part information in instances of this class.
SoNodekitCatalog::~SoNodekitCatalog | ( | ) |
Destructor.
References SbList< Type >::getLength().
int SoNodekitCatalog::getNumEntries | ( | void | ) | const |
Returns total number of entries in the catalog.
References SbList< Type >::getLength().
Referenced by addEntry(), getDefaultType(), getListContainerType(), getListItemTypes(), getName(), getParentName(), getParentPartNumber(), getRightSiblingName(), getRightSiblingPartNumber(), getType(), isLeaf(), isList(), isPublic(), printCheck(), and recursiveSearch().
Returns part number in catalog with name. If no part exists with name, returns SO_CATALOG_NAME_NOT_FOUND
.
References SbList< Type >::getLength(), and getPartNumber().
Referenced by addEntry(), getDefaultType(), getListContainerType(), getListItemTypes(), getParentName(), getParentPartNumber(), getParentPartNumber(), getPartNumber(), getRightSiblingName(), getRightSiblingPartNumber(), getRightSiblingPartNumber(), getType(), isLeaf(), isList(), isNullByDefault(), isPublic(), narrowTypes(), and setNullByDefault().
Given the part number, return name of that part.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by SoBaseKit::createFieldList(), SoBaseKit::printSubDiagram(), and recursiveSearch().
SoType SoNodekitCatalog::getType | ( | int | part | ) | const |
Given the part number, return type.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getType(), and recursiveSearch().
Given the part name, return type.
References SbList< Type >::getLength(), getPartNumber(), and getType().
SoType SoNodekitCatalog::getDefaultType | ( | int | part | ) | const |
Given part number, return default type of part.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getDefaultType().
Given part name, return default type of part.
References getDefaultType(), SbList< Type >::getLength(), and getPartNumber().
SbBool SoNodekitCatalog::isNullByDefault | ( | int | part | ) | const |
Returns TRUE
if the part is empty by default, otherwise FALSE
.
References SbList< Type >::getLength().
Referenced by isNullByDefault().
Returns TRUE
if part name is empty by default, otherwise FALSE
.
References SbList< Type >::getLength(), getPartNumber(), and isNullByDefault().
SbBool SoNodekitCatalog::isLeaf | ( | int | part | ) | const |
Returns TRUE
if the part is not a parent for any other parts in the nodekit catalog.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by isLeaf().
Returns TRUE
if the part name is not a parent for any other parts in the nodekit catalog.
References SbList< Type >::getLength(), getPartNumber(), and isLeaf().
Returns name of parent of part. If part doesn't have a parent, the empty string is returned.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getParentName().
Returns name of parent of the part. If name doesn't have a parent, the empty string is returned.
References SbList< Type >::getLength(), getParentName(), and getPartNumber().
int SoNodekitCatalog::getParentPartNumber | ( | int | part | ) | const |
Returns part number of given part's parent. If part doesn't have a parent, SO_CATALOG_NAME_NOT_FOUND is returned.
References SbList< Type >::getLength(), getNumEntries(), and getPartNumber().
Referenced by getParentPartNumber().
Returns part number of given part's parent. If name doesn't have a parent, SO_CATALOG_NAME_NOT_FOUND is returned.
References SbList< Type >::getLength(), getParentPartNumber(), and getPartNumber().
Returns name of right sibling of part. Returns the empty string if part doesn't have a right sibling.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getRightSiblingName().
Returns name of sibling of the part. Returns the empty string if name doesn't have a right sibling.
References SbList< Type >::getLength(), getPartNumber(), and getRightSiblingName().
int SoNodekitCatalog::getRightSiblingPartNumber | ( | int | part | ) | const |
Returns part number of given part's sibling. Returns SO_CATALOG_NAME_NOT_FOUND if part doesn't have a right sibling.
References SbList< Type >::getLength(), getNumEntries(), and getPartNumber().
Referenced by getRightSiblingPartNumber().
Returns part number of given part's right sibling. Returns SO_CATALOG_NAME_NOT_FOUND if part doesn't have a right sibling.
References SbList< Type >::getLength(), getPartNumber(), and getRightSiblingPartNumber().
SbBool SoNodekitCatalog::isList | ( | int | part | ) | const |
Returns TRUE
if the given part is a list container.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by isList().
Returns TRUE
if the given part is a list container.
References SbList< Type >::getLength(), getPartNumber(), and isList().
SoType SoNodekitCatalog::getListContainerType | ( | int | part | ) | const |
Returns type of list container (SoGroup, SoSeparator, SoSwitch, etc) which part is.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getListContainerType().
Returns type of list container (SoGroup, SoSeparator, SoSwitch, etc) which the named part is.
References SbList< Type >::getLength(), getListContainerType(), and getPartNumber().
const SoTypeList & SoNodekitCatalog::getListItemTypes | ( | int | part | ) | const |
Returns list of node types which are allowed to be children of the list container part.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by getListItemTypes().
const SoTypeList & SoNodekitCatalog::getListItemTypes | ( | const SbName & | name | ) | const |
Returns list of node types which are allowed to be children of the named list container part.
References SbList< Type >::getLength(), getListItemTypes(), and getPartNumber().
SbBool SoNodekitCatalog::isPublic | ( | int | part | ) | const |
Returns TRUE
if part is visible and publicly available for queries and modifications, FALSE
if part is hidden.
References SbList< Type >::getLength(), and getNumEntries().
Referenced by isPublic().
Returns TRUE
if the part is visible and publicly available for queries and modifications, FALSE
if it is hidden.
References SbList< Type >::getLength(), getPartNumber(), and isPublic().
SoNodekitCatalog * SoNodekitCatalog::clone | ( | SoType | type | ) | const |
Return a clone of this catalog. type will be used to set the type and defaulttype values of the toplevel this
entry.
References SbList< Type >::append(), SbList< Type >::getLength(), and SoNodekitCatalog().
SbBool SoNodekitCatalog::addEntry | ( | const SbName & | name, |
SoType | type, | ||
SoType | defaulttype, | ||
SbBool | isdefaultnull, | ||
const SbName & | parentname, | ||
const SbName & | rightsiblingname, | ||
SbBool | islist, | ||
SoType | listcontainertype, | ||
SoType | listitemtype, | ||
SbBool | ispublic | ||
) |
Add a new entry to the catalog. Returns TRUE
if add was ok.
References SbList< Type >::append(), SoType::badType(), SbList< Type >::getLength(), getNumEntries(), getPartNumber(), SbName::getString(), SoDebugError::postInfo(), and SbList< Type >::remove().
Add another allowable type for the given part. part must of course be a list container item.
References addListItemType(), and SbList< Type >::getLength().
Referenced by addListItemType(), and addListItemType().
Add another allowable type for the name part. The part must of course be a list container.
References addListItemType(), SbName::getString(), and SoDebugError::post().
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.
References SbList< Type >::getLength(), and getPartNumber().
Change whether or not the part with the given name is created by default.
References SbList< Type >::getLength(), and getPartNumber().
SbBool SoNodekitCatalog::recursiveSearch | ( | int | part, |
const SbName & | name, | ||
SoTypeList * | 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.
References SbList< Type >::append(), SbList< Type >::find(), SbList< Type >::getLength(), getName(), SoBaseKit::getNodekitCatalog(), getNumEntries(), getType(), SoBase::ref(), and SoBase::unref().
Lists all catalog parts, which is useful for debugging.
References SoType::badType(), SbList< Type >::getLength(), and getNumEntries().
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Jul 19 2023 for Coin by Doxygen. 1.9.8