SoNodekitCatalog.h
#ifndef COIN_SONODEKITCATALOG_H
#define COIN_SONODEKITCATALOG_H
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#include <Inventor/SoType.h>
#include <Inventor/lists/SbList.h>
class SbName;
#define SO_CATALOG_NAME_NOT_FOUND -1
class COIN_DLL_API SoNodekitCatalog {
public:
static void initClass(void);
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;
private:
SbBool hasEntry(const SbName & name) const;
SbBool hasListItemType(const SbName & name, SoType type) const;
SbBool reallyAddEntry(class CatalogItem * newitem);
int getPartNumber(const SbList<class CatalogItem *> & l,
const SbName & name) const;
void addListItemType(const SbList<class CatalogItem *> & l,
int part, SoType type);
SbBool addListItemType(const SbList<class CatalogItem *> & l,
const SbName & name, SoType type);
SbList<class CatalogItem *> items;
SbList<class CatalogItem *> delayeditems;
};
#endif // !COIN_SONODEKITCATALOG_H
SbList
The SbList class is a template container class for lists.
Definition SbList.h:70
SbName
The SbName class stores strings by reference.
Definition SbName.h:40
SoNodekitCatalog::isPublic
SbBool isPublic(int part) const
Definition SoNodekitCatalog.cpp:423
SoNodekitCatalog::getNumEntries
int getNumEntries(void) const
Definition SoNodekitCatalog.cpp:106
SoNodekitCatalog::getRightSiblingName
const SbName & getRightSiblingName(int part) const
Definition SoNodekitCatalog.cpp:294
SoNodekitCatalog::SoNodekitCatalog
SoNodekitCatalog(void)
Definition SoNodekitCatalog.cpp:86
SoNodekitCatalog::addEntry
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)
Definition SoNodekitCatalog.cpp:489
SoNodekitCatalog::getDefaultType
SoType getDefaultType(int part) const
Definition SoNodekitCatalog.cpp:162
SoNodekitCatalog::clone
SoNodekitCatalog * clone(SoType type) const
Definition SoNodekitCatalog.cpp:447
SoNodekitCatalog::getType
SoType getType(int part) const
Definition SoNodekitCatalog.cpp:140
SoNodekitCatalog::getName
const SbName & getName(int part) const
Definition SoNodekitCatalog.cpp:127
SoNodekitCatalog::isNullByDefault
SbBool isNullByDefault(int part) const
Definition SoNodekitCatalog.cpp:185
SoNodekitCatalog::printCheck
void printCheck(void) const
Definition SoNodekitCatalog.cpp:756
SoNodekitCatalog::getListItemTypes
const SoTypeList & getListItemTypes(int part) const
Definition SoNodekitCatalog.cpp:396
SoNodekitCatalog::addListItemType
void addListItemType(int part, SoType type)
Definition SoNodekitCatalog.cpp:635
SoNodekitCatalog::getParentName
const SbName & getParentName(int part) const
Definition SoNodekitCatalog.cpp:245
SoNodekitCatalog::recursiveSearch
SbBool recursiveSearch(int part, const SbName &name, SoTypeList *checked) const
Definition SoNodekitCatalog.cpp:719
SoNodekitCatalog::narrowTypes
void narrowTypes(const SbName &name, SoType newtype, SoType newdefaulttype)
Definition SoNodekitCatalog.cpp:673
SoNodekitCatalog::isList
SbBool isList(int part) const
Definition SoNodekitCatalog.cpp:345
SoNodekitCatalog::initClass
static void initClass(void)
Definition SoNodekitCatalog.cpp:79
SoNodekitCatalog::getRightSiblingPartNumber
int getRightSiblingPartNumber(int part) const
Definition SoNodekitCatalog.cpp:320
SoNodekitCatalog::setNullByDefault
void setNullByDefault(const SbName &name, SbBool nullbydefault)
Definition SoNodekitCatalog.cpp:700
SoNodekitCatalog::getParentPartNumber
int getParentPartNumber(int part) const
Definition SoNodekitCatalog.cpp:269
SoNodekitCatalog::getListContainerType
SoType getListContainerType(int part) const
Definition SoNodekitCatalog.cpp:369
SoNodekitCatalog::isLeaf
SbBool isLeaf(int part) const
Definition SoNodekitCatalog.cpp:216
SoNodekitCatalog::getPartNumber
int getPartNumber(const SbName &name) const
Definition SoNodekitCatalog.cpp:117
SoTypeList
The SoTypeList class is a container class for arrays of SoType objects.
Definition SoTypeList.h:39
SoType
The SoType class is the basis for the runtime type system in Coin.
Definition SoType.h:59