1#ifndef DynamicNodeKit_H
2#define DynamicNodeKit_H
4#include <Inventor/nodekits/SoBaseKit.h>
5#include <Inventor/nodekits/SoSubKit.h>
7#include <Inventor/fields/SoFieldData.h>
8#include <Inventor/nodekits/SoNodekitCatalog.h>
10#include <Inventor/C/XML/parser.h>
11#include <Inventor/C/XML/document.h>
12#include <Inventor/C/XML/element.h>
13#include <Inventor/C/XML/attribute.h>
28 static SoType getClassTypeId(
void);
29 virtual SoType getTypeId(
void)
const;
34 virtual const SoFieldData * getFieldData(
void)
const;
38 static void atexit_cleanup(
void);
41 static unsigned int classinstances;
42 static void * createInstance(
void);
45 static void atexit_cleanupkit(
void);
52 static void initClass(
void);
83#ifndef DYNAMIC_NODEKIT_NO_GENERATE_FUNCTIONS
168 return dynamicFieldData;
177 return this->dynamicCatalog;
200 SoNode::getNextActionMethodIndex());
201 SoNode::incNextActionMethodIndex();
219 this->dynamicFieldData->copy(inherited::getFieldData());
222 this->staticPartCount = dynamicCatalog->getNumEntries();
224 this->finished =
false;
225 this->isEditing =
false;
233 const int n = this->dynamicFieldData->getNumFields();
234 for (
int i = 0;
i < n;
i++) {
235 SoField *
f = this->dynamicFieldData->getField(
this,
i);
236 if ((*this->getFieldDataPtr())->getIndex(
this,
f) == -1) {
240 delete this->dynamicFieldData;
241 delete this->dynamicCatalog;
253 const int n =
src->getNumFields();
254 for (
int i = 0;
i < n;
i++) {
256 if (this->dynamicFieldData->getIndex(
this,
f) == -1) {
258 cp->setFieldType(
f->getFieldType());
259 cp->setContainer(
this);
260 this->dynamicFieldData->addField(
this,
src->getFieldName(
i),
cp);
272 if (!this->isEditing){
278 f->setContainer(
this);
280 this->dynamicFieldData->addField(
this, name.getString(),
f);
289 if (!this->isEditing){
296 SoSFNode *
f =
new SoSFNode;
297 f->setContainer(
this);
299 this->dynamicFieldData->addField(
this, name.getString(),
f);
312 this->isEditing =
true;
321 if (!this->isEditing || this->finished){
328 this->isEditing =
false;
329 this->finished =
true;
338 if (this->finished || this->isEditing){
349 this->startEditing();
357 this->addField(name, type,
value);
360 this->addPartsFromXml(root,
"this",
"");
361 this->finishEditing();
Definition DynamicNodeKit.h:21
Definition misc/SbList.h:69