Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members

# SoNodekitCatalog.h

    00001 #ifndef COIN_SONODEKITCATALOG_H
    00002 #define COIN_SONODEKITCATALOG_H
    00003
    00004 /**************************************************************************\
    00005  *
    00006  *  This file is part of the Coin 3D visualization library.
    00007  *  Copyright (C) 1998-2003 by Systems in Motion.  All rights reserved.
    00008  *
    00009  *  This library is free software; you can redistribute it and/or
    00010  *  modify it under the terms of the GNU General Public License
    00011  *  ("GPL") version 2 as published by the Free Software Foundation.
    00012  *  See the file LICENSE.GPL at the root directory of this source
    00013  *  distribution for additional information about the GNU GPL.
    00014  *
    00015  *  For using Coin with software that can not be combined with the GNU
    00016  *  GPL, and for taking advantage of the additional benefits of our
    00017  *  support services, please contact Systems in Motion about acquiring
    00018  *  a Coin Professional Edition License.
    00019  *
    00020  *  See <URL:http://www.coin3d.org> for  more information.
    00021  *
    00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
    00023  *  <URL:http://www.sim.no>.
    00024  *
    00025 \**************************************************************************/
    00026
    00027 #include <Inventor/SoType.h>
    00028 #include <Inventor/lists/SbList.h>
    00029
    00030 class SbName;
    00031
    00032
    00033 #define SO_CATALOG_NAME_NOT_FOUND -1
    00034
    00035
    00036 class COIN_DLL_API SoNodekitCatalog {
    00037 public:
    00038   static void initClass(void);
    00039
    00040   SoNodekitCatalog(void);
    00041   ~SoNodekitCatalog();
    00042
    00043   int getNumEntries(void) const;
    00044   int getPartNumber(const SbName & name) const;
    00045   const SbName & getName(int part) const;
    00046
    00047   SoType getType(int part) const;
    00048   SoType getType(const SbName & name) const;
    00049   SoType getDefaultType(int part) const;
    00050   SoType getDefaultType(const SbName & name) const;
    00051   SbBool isNullByDefault(int part) const;
    00052   SbBool isNullByDefault(const SbName & name) const;
    00053
    00054   SbBool isLeaf(int part) const;
    00055   SbBool isLeaf(const SbName & name) const;
    00056   const SbName & getParentName(int part) const;
    00057   const SbName & getParentName(const SbName & name) const;
    00058   int getParentPartNumber(int part) const;
    00059   int getParentPartNumber(const SbName & name) const;
    00060   const SbName & getRightSiblingName(int part) const;
    00061   const SbName & getRightSiblingName(const SbName & name) const;
    00062   int getRightSiblingPartNumber(int part) const;
    00063   int getRightSiblingPartNumber(const SbName & name) const;
    00064
    00065   SbBool isList(int part) const;
    00066   SbBool isList(const SbName & name) const;
    00067   SoType getListContainerType(int part) const;
    00068   SoType getListContainerType(const SbName & name) const;
    00069   const SoTypeList & getListItemTypes(int part) const;
    00070   const SoTypeList & getListItemTypes(const SbName & name) const;
    00071
    00072   SbBool isPublic(int part) const;
    00073   SbBool isPublic(const SbName & name) const;
    00074
    00075   SoNodekitCatalog * clone(SoType type) const;
    00076
    00077   SbBool addEntry(const SbName & name, SoType type, SoType defaulttype,
    00078                   SbBool isdefaultnull, const SbName & parent,
    00079                   const SbName & rightsibling, SbBool islist,
    00080                   SoType listcontainertype, SoType listitemtype,
    00081                   SbBool ispublic);
    00082   void addListItemType(int part, SoType type);
    00083   void addListItemType(const SbName & name, SoType type);
    00084
    00085   void narrowTypes(const SbName & name, SoType newtype, SoType newdefaulttype);
    00086   void setNullByDefault(const SbName & name, SbBool nullbydefault);
    00087
    00088   SbBool recursiveSearch(int part, const SbName & name,
    00089                          SoTypeList * checked) const;
    00090
    00091   void printCheck(void) const;
    00092
    00093 private:
    00094   SbBool reallyAddEntry(class CatalogItem * newitem);
    00095
    00096   int getPartNumber(const SbList<class CatalogItem *> & l,
    00097                     const SbName & name) const;
    00098   void addListItemType(const SbList<class CatalogItem *> & l,
    00099                        int part, SoType type);
    00100   SbBool addListItemType(const SbList<class CatalogItem *> & l,
    00101                          const SbName & name, SoType type);
    00102
    00103   SbList<class CatalogItem *> items;
    00104   SbList<class CatalogItem *> delayeditems;
    00105 };
    00106
    00107 #endif // !COIN_SONODEKITCATALOG_H