SoNodekitCatalog.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoNodekitCatalog.h
1 #ifndef COIN_SONODEKITCATALOG_H
2 #define COIN_SONODEKITCATALOG_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/SoType.h>
28 #include <Inventor/lists/SbList.h>
29
30 class SbName;
31
32
33 #define SO_CATALOG_NAME_NOT_FOUND -1
34
35
36 class COIN_DLL_API SoNodekitCatalog {
37 public:
38 static void initClass(void);
39
40 SoNodekitCatalog(void);
41 ~SoNodekitCatalog();
42
43 int getNumEntries(void) const;
44 int getPartNumber(const SbName & name) const;
45 const SbName & getName(int part) const;
46
47 SoType getType(int part) const;
48 SoType getType(const SbName & name) const;
49 SoType getDefaultType(int part) const;
50 SoType getDefaultType(const SbName & name) const;
51 SbBool isNullByDefault(int part) const;
52 SbBool isNullByDefault(const SbName & name) const;
53
54 SbBool isLeaf(int part) const;
55 SbBool isLeaf(const SbName & name) const;
56 const SbName & getParentName(int part) const;
57 const SbName & getParentName(const SbName & name) const;
58 int getParentPartNumber(int part) const;
59 int getParentPartNumber(const SbName & name) const;
60 const SbName & getRightSiblingName(int part) const;
61 const SbName & getRightSiblingName(const SbName & name) const;
62 int getRightSiblingPartNumber(int part) const;
63 int getRightSiblingPartNumber(const SbName & name) const;
64
65 SbBool isList(int part) const;
66 SbBool isList(const SbName & name) const;
67 SoType getListContainerType(int part) const;
68 SoType getListContainerType(const SbName & name) const;
69 const SoTypeList & getListItemTypes(int part) const;
70 const SoTypeList & getListItemTypes(const SbName & name) const;
71
72 SbBool isPublic(int part) const;
73 SbBool isPublic(const SbName & name) const;
74
75 SoNodekitCatalog * clone(SoType type) const;
76
77 SbBool addEntry(const SbName & name, SoType type, SoType defaulttype,
78 SbBool isdefaultnull, const SbName & parent,
79 const SbName & rightsibling, SbBool islist,
80 SoType listcontainertype, SoType listitemtype,
81 SbBool ispublic);
82 void addListItemType(int part, SoType type);
83 void addListItemType(const SbName & name, SoType type);
84
85 void narrowTypes(const SbName & name, SoType newtype, SoType newdefaulttype);
86 void setNullByDefault(const SbName & name, SbBool nullbydefault);
87
88 SbBool recursiveSearch(int part, const SbName & name,
89 SoTypeList * checked) const;
90
91 void printCheck(void) const;
92
93 private:
94 SbBool hasEntry(const SbName & name) const;
95 SbBool hasListItemType(const SbName & name, SoType type) const;
96 SbBool reallyAddEntry(class CatalogItem * newitem);
97
98 int getPartNumber(const SbList<class CatalogItem *> & l,
99 const SbName & name) const;
100 void addListItemType(const SbList<class CatalogItem *> & l,
101 int part, SoType type);
102 SbBool addListItemType(const SbList<class CatalogItem *> & l,
103 const SbName & name, SoType type);
104
105 SbList<class CatalogItem *> items;
106 SbList<class CatalogItem *> delayeditems;
107 };
108
109 #endif // !COIN_SONODEKITCATALOG_H
SbList< class CatalogItem * >
SoNodekitCatalog
The SoNodekitCatalog class is a container for nodekit layouts.Nodekits store all their hierarchical l...
Definition: SoNodekitCatalog.h:36
SoTypeList
The SoTypeList class is a container class for arrays of SoType objects.
Definition: SoTypeList.h:30
SoType
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:50
SbName
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.