Coin Logo http://www.sim.no
http://www.coin3d.org

Public Member Functions | Static Public Member Functions | List of all members
SoNodekitCatalog Class Reference

The SoNodekitCatalog class is a container for nodekit layouts.Nodekits store all their hierarchical layout information and part information in instances of this class. More...

#include <Inventor/nodekits/SoNodekitCatalog.h>

Public Member Functions

 SoNodekitCatalog (void)
 
 ~SoNodekitCatalog ()
 
int getNumEntries (void) const
 
int getPartNumber (const SbName &name) const
 
const SbNamegetName (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 SbNamegetParentName (int part) const
 
const SbNamegetParentName (const SbName &name) const
 
int getParentPartNumber (int part) const
 
int getParentPartNumber (const SbName &name) const
 
const SbNamegetRightSiblingName (int part) const
 
const SbNamegetRightSiblingName (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 SoTypeListgetListItemTypes (int part) const
 
const SoTypeListgetListItemTypes (const SbName &name) const
 
SbBool isPublic (int part) const
 
SbBool isPublic (const SbName &name) const
 
SoNodekitCatalogclone (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::SoNodekitCatalog ( void  )

Constructor.

Referenced by clone().

◆ ~SoNodekitCatalog()

SoNodekitCatalog::~SoNodekitCatalog ( )

Destructor.

References SbList< Type >::getLength().

Member Function Documentation

◆ initClass()

void SoNodekitCatalog::initClass ( void  )
static

Initialization of static variables.

◆ getNumEntries()

int SoNodekitCatalog::getNumEntries ( void  ) const

◆ getPartNumber()

int SoNodekitCatalog::getPartNumber ( const SbName name) const

◆ getName()

const SbName & SoNodekitCatalog::getName ( int  part) const

◆ getType() [1/2]

SoType SoNodekitCatalog::getType ( int  part) const

Given the part number, return type.

References SbList< Type >::getLength(), and getNumEntries().

Referenced by getType(), SoBaseKit::printSubDiagram(), SoBaseKit::printTable(), and recursiveSearch().

◆ getType() [2/2]

SoType SoNodekitCatalog::getType ( const SbName name) const

Given the part name, return type.

References SbList< Type >::getLength(), getPartNumber(), and getType().

◆ getDefaultType() [1/2]

SoType SoNodekitCatalog::getDefaultType ( int  part) const

Given part number, return default type of part.

References SbList< Type >::getLength(), and getNumEntries().

Referenced by getDefaultType(), and SoBaseKit::printTable().

◆ getDefaultType() [2/2]

SoType SoNodekitCatalog::getDefaultType ( const SbName name) const

Given part name, return default type of part.

References getDefaultType(), SbList< Type >::getLength(), and getPartNumber().

◆ isNullByDefault() [1/2]

SbBool SoNodekitCatalog::isNullByDefault ( int  part) const

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

References SbList< Type >::getLength().

Referenced by SoBaseKit::createDefaultParts(), isNullByDefault(), and SoBaseKit::setDefaultOnNonWritingFields().

◆ isNullByDefault() [2/2]

SbBool SoNodekitCatalog::isNullByDefault ( const SbName name) const

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

References SbList< Type >::getLength(), getPartNumber(), and isNullByDefault().

◆ isLeaf() [1/2]

SbBool SoNodekitCatalog::isLeaf ( int  part) const

◆ isLeaf() [2/2]

SbBool SoNodekitCatalog::isLeaf ( const SbName name) const

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().

◆ getParentName() [1/2]

const SbName & SoNodekitCatalog::getParentName ( int  part) const

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(), and SoBaseKit::printSubDiagram().

◆ getParentName() [2/2]

const SbName & SoNodekitCatalog::getParentName ( const SbName name) const

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().

◆ getParentPartNumber() [1/2]

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().

◆ getParentPartNumber() [2/2]

int SoNodekitCatalog::getParentPartNumber ( const SbName name) const

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().

◆ getRightSiblingName() [1/2]

const SbName & SoNodekitCatalog::getRightSiblingName ( int  part) const

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().

◆ getRightSiblingName() [2/2]

const SbName & SoNodekitCatalog::getRightSiblingName ( const SbName name) const

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().

◆ getRightSiblingPartNumber() [1/2]

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().

◆ getRightSiblingPartNumber() [2/2]

int SoNodekitCatalog::getRightSiblingPartNumber ( const SbName 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.

References SbList< Type >::getLength(), getPartNumber(), and getRightSiblingPartNumber().

◆ isList() [1/2]

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(), and SoBaseKit::printTable().

◆ isList() [2/2]

SbBool SoNodekitCatalog::isList ( const SbName name) const

Returns TRUE if the given part is a list container.

References SbList< Type >::getLength(), getPartNumber(), and isList().

◆ getListContainerType() [1/2]

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().

◆ getListContainerType() [2/2]

SoType SoNodekitCatalog::getListContainerType ( const SbName name) const

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

References SbList< Type >::getLength(), getListContainerType(), and getPartNumber().

◆ getListItemTypes() [1/2]

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(), and SoBaseKit::printTable().

◆ getListItemTypes() [2/2]

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().

◆ isPublic() [1/2]

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 SoBaseKit::createPathToAnyPart(), SoBaseKit::getAnyPart(), isPublic(), SoBaseKit::printTable(), and SoBaseKit::setAnyPart().

◆ isPublic() [2/2]

SbBool SoNodekitCatalog::isPublic ( const SbName name) const

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().

◆ clone()

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 >::getLength(), and SoNodekitCatalog().

◆ addEntry()

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 
)

◆ addListItemType() [1/2]

void SoNodekitCatalog::addListItemType ( int  part,
SoType  type 
)

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

References SbList< Type >::getLength().

Referenced by addListItemType().

◆ addListItemType() [2/2]

void SoNodekitCatalog::addListItemType ( const SbName name,
SoType  type 
)

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

References addListItemType(), SbName::getString(), and SoDebugError::post().

◆ narrowTypes()

void SoNodekitCatalog::narrowTypes ( const SbName name,
SoType  newtype,
SoType  newdefaulttype 
)

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(), getPartNumber(), and SoType::isDerivedFrom().

◆ setNullByDefault()

void SoNodekitCatalog::setNullByDefault ( const SbName name,
SbBool  nullbydefault 
)

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

References SbList< Type >::getLength(), and getPartNumber().

◆ recursiveSearch()

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 SoTypeList::append(), SoType::createInstance(), SoTypeList::find(), SbList< Type >::getLength(), getName(), SoBaseKit::getNodekitCatalog(), getNumEntries(), getType(), SoType::isDerivedFrom(), recursiveSearch(), SoBase::ref(), and SoBase::unref().

Referenced by recursiveSearch().

◆ printCheck()

void SoNodekitCatalog::printCheck ( void  ) const

Lists all catalog parts, which is useful for debugging.

References SoType::badType(), and getNumEntries().


The documentation for this class was generated from the following files:

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Fri Jul 20 2018 for Coin by Doxygen. 1.8.14