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

SoProtoInstance.h
1 #ifndef COIN_SOPROTOINSTANCE_H
2 #define COIN_SOPROTOINSTANCE_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 // NB: This is work-in-progress, and the API might change from day to
28 // day. Do not use this class unless you are prepared for this.
29 // pederb, 2002-05-28
30
31 #include <Inventor/nodes/SoNode.h>
32 #include <Inventor/nodes/SoSubNode.h>
33
34 class SoProto;
35 class SoSensor;
36
37 class COIN_DLL_API SoProtoInstance : public SoNode {
38 typedef SoNode inherited;
39
40 // The following definitions are used instead of SO_NODE_HEADER() to
41 // let SoProtoInstance have dynamic handling of SoFieldData objects.
42
43 PRIVATE_NODE_TYPESYSTEM_HEADER();
44 protected:
45 virtual const SoFieldData * getFieldData(void) const;
46 private:
47 SoFieldData * classfielddata;
48
49 public:
50 static void initClass(void);
51
52 SoProtoInstance(SoProto * proto,
53 const SoFieldData * deffielddata);
54
55 static SoProtoInstance * findProtoInstance(const SoNode * rootnode);
56 void setRootNode(SoNode * root);
57 SoNode * getRootNode(void);
58
59 SoProto * getProtoDefinition(void) const;
60 SbName getProtoName(void) const;
61
62 virtual void write(SoWriteAction * action);
63
64 protected:
65 virtual ~SoProtoInstance();
66 virtual SbBool readInstance(SoInput * in, unsigned short flags);
67 virtual const char * getFileFormatName(void) const;
68
69 private:
70
71 static void sensorCB(void * data, SoSensor * sensor);
72 static void cleanupClass(void);
73 void copyFieldData(const SoFieldData * src);
74
75 class SoProtoInstanceP * pimpl;
76 };
77
78 #endif // !COIN_SOPROTOINSTANCE_H
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:36
SoBase::getFileFormatName
virtual const char * getFileFormatName(void) const
Definition: SoBase.cpp:1326
SoNode
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
SoFieldContainer::getFieldData
virtual const SoFieldData * getFieldData(void) const
Definition: SoFieldContainer.cpp:738
SoProtoInstance
The SoProtoInstance class handles PROTO instances.
Definition: SoProtoInstance.h:37
SoSensor
The SoSensor class is the abstract base class for all sensors.Sensors is a mechanism in Coin for sche...
Definition: SoSensor.h:34
SoNode::readInstance
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoNode.cpp:1466
SoProto
The SoProto class handles PROTO definitions.
Definition: SoProto.h:41
SoWriteAction
The SoWriteAction class writes a scene graph to file.When applied to a scene, this action writes its ...
Definition: SoWriteAction.h:33
SoInput
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
SoFieldData
The SoFieldData class is a container for a prototype set of fields.This class is instantiated once fo...
Definition: SoFieldData.h:39
SoNode::write
virtual void write(SoWriteAction *action)
Definition: SoNode.cpp:1217
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.