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

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) 1998-2007 by Systems in Motion. All rights reserved.
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 Systems in Motion about acquiring
18 * a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, 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
30class SbName;
31
32
33#define SO_CATALOG_NAME_NOT_FOUND -1
34
35
36class COIN_DLL_API SoNodekitCatalog {
37public:
38 static void initClass(void);
39
40 SoNodekitCatalog(void);
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
93private:
94 SbBool hasEntry(const SbName & name) const;
95 SbBool hasListItemType(const SbName & name, SoType type) const;
96 SbBool reallyAddEntry(class CatalogItem * newitem);
97
99 const SbName & name) const;
101 int part, SoType type);
103 const SbName & name, SoType type);
104
106 SbList<class CatalogItem *> delayeditems;
107};
108
109#endif // !COIN_SONODEKITCATALOG_H
The SbList class is a template container class for lists.
Definition SbList.h:47
The SbName class stores strings by reference.
Definition SbName.h:31
SbBool isPublic(int part) const
Definition SoNodekitCatalog.cpp:406
int getNumEntries(void) const
Definition SoNodekitCatalog.cpp:89
const SbName & getRightSiblingName(int part) const
Definition SoNodekitCatalog.cpp:277
SoNodekitCatalog(void)
Definition SoNodekitCatalog.cpp:69
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:472
SoType getDefaultType(int part) const
Definition SoNodekitCatalog.cpp:145
SoNodekitCatalog * clone(SoType type) const
Definition SoNodekitCatalog.cpp:430
SoType getType(int part) const
Definition SoNodekitCatalog.cpp:123
const SbName & getName(int part) const
Definition SoNodekitCatalog.cpp:110
SbBool isNullByDefault(int part) const
Definition SoNodekitCatalog.cpp:168
void printCheck(void) const
Definition SoNodekitCatalog.cpp:739
const SoTypeList & getListItemTypes(int part) const
Definition SoNodekitCatalog.cpp:379
void addListItemType(int part, SoType type)
Definition SoNodekitCatalog.cpp:618
const SbName & getParentName(int part) const
Definition SoNodekitCatalog.cpp:228
SbBool recursiveSearch(int part, const SbName &name, SoTypeList *checked) const
Definition SoNodekitCatalog.cpp:702
void narrowTypes(const SbName &name, SoType newtype, SoType newdefaulttype)
Definition SoNodekitCatalog.cpp:656
SbBool isList(int part) const
Definition SoNodekitCatalog.cpp:328
static void initClass(void)
Definition SoNodekitCatalog.cpp:62
int getRightSiblingPartNumber(int part) const
Definition SoNodekitCatalog.cpp:303
void setNullByDefault(const SbName &name, SbBool nullbydefault)
Definition SoNodekitCatalog.cpp:683
int getParentPartNumber(int part) const
Definition SoNodekitCatalog.cpp:252
SoType getListContainerType(int part) const
Definition SoNodekitCatalog.cpp:352
SbBool isLeaf(int part) const
Definition SoNodekitCatalog.cpp:199
int getPartNumber(const SbName &name) const
Definition SoNodekitCatalog.cpp:100
The SoTypeList class is a container class for arrays of SoType objects.
Definition SoTypeList.h:30
The SoType class is the basis for the run-time type system in Coin.
Definition SoType.h:50

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

Generated on Thu Jan 16 2025 for Coin by Doxygen. 1.13.2