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

SoNodekitCatalog.h

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

Generated at Tue Mar 5 03:31:15 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001