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

SoFieldContainer.h
1 #ifndef COIN_SOFIELDCONTAINER_H
2 #define COIN_SOFIELDCONTAINER_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/misc/SoBase.h>
28
29 class SbString;
30 class SoFieldData;
31 class SoFieldList;
32 class SoOutput;
33
34 class COIN_DLL_API SoFieldContainer : public SoBase {
35 typedef SoBase inherited;
36
37 public:
38 static void initClass(void);
39 static SoType getClassTypeId(void);
40 static void cleanupClass(void);
41
42 void setToDefaults(void);
43 SbBool hasDefaultValues(void) const;
44
45 SbBool fieldsAreEqual(const SoFieldContainer * container) const;
46 void copyFieldValues(const SoFieldContainer * container,
47 SbBool copyconnections = FALSE);
48
49 SbBool set(const char * const fielddata);
50 void get(SbString & fielddata);
51
52 virtual int getFields(SoFieldList & l) const;
53 virtual int getAllFields(SoFieldList & l) const;
54 virtual SoField * getField(const SbName & name) const;
55 virtual SoField * getEventIn(const SbName & name) const;
56 virtual SoField * getEventOut(const SbName & name) const;
57 SbBool getFieldName(const SoField * const field, SbName & name) const;
58
59 SbBool enableNotify(const SbBool flag);
60 SbBool isNotifyEnabled(void) const;
61
62 SbBool set(const char * fielddata, SoInput * input);
63 void get(SbString & fielddata, SoOutput * out);
64
65 virtual void notify(SoNotList * l);
66
67 virtual SbBool validateNewFieldValue(SoField * field, void * newval);
68
69 virtual void addWriteReference(SoOutput * out, SbBool isfromfield = FALSE);
70 virtual void writeInstance(SoOutput * out);
71
72 SbBool getIsBuiltIn(void) const;
73 virtual const SoFieldData * getFieldData(void) const;
74
75 virtual void copyContents(const SoFieldContainer * from,
76 SbBool copyconnections);
77 virtual SoFieldContainer * copyThroughConnection(void) const;
78
79 static void initCopyDict(void);
80 static void addCopy(const SoFieldContainer * orig,
81 const SoFieldContainer * copy);
82 static SoFieldContainer * checkCopy(const SoFieldContainer * orig);
83 static SoFieldContainer * findCopy(const SoFieldContainer * orig,
84 const SbBool copyconnections);
85 static void copyDone(void);
86
87 virtual void getFieldsMemorySize(size_t & managed, size_t & unmanaged) const;
88
89 void setUserData(void * userdata) const;
90 void * getUserData(void) const;
91
92 protected:
93 SoFieldContainer(void);
94 virtual ~SoFieldContainer();
95
96 virtual SbBool readInstance(SoInput * in, unsigned short flags);
97 SbBool isBuiltIn;
98
99 private:
100 static SoType classTypeId;
101 SbBool donotify;
102
103 }; // SoFieldContainer
104
105 #endif // !COIN_SOFIELDCONTAINER_H
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:36
SoOutput
The SoOutput class is an abstraction of an output stream.SoOutput offers the ability to write basic t...
Definition: SoOutput.h:42
SoFieldContainer
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.h:34
SoField
The SoField class is the top-level abstract base class for fields.Fields is the mechanism used throug...
Definition: SoField.h:38
SoBase::notify
virtual void notify(SoNotList *l)
Definition: SoBase.cpp:778
SoBase::addWriteReference
virtual void addWriteReference(SoOutput *out, SbBool isfromfield=FALSE)
Definition: SoBase.cpp:871
SoBase::readInstance
virtual SbBool readInstance(SoInput *input, unsigned short flags)=0
SoBase::initClass
static void initClass(void)
Definition: SoBase.cpp:338
SoInput
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
SoBase::getClassTypeId
static SoType getClassTypeId(void)
Definition: SoBase.cpp:616
SoFieldData
The SoFieldData class is a container for a prototype set of fields.This class is instantiated once fo...
Definition: SoFieldData.h:39
SoFieldContainer::isBuiltIn
SbBool isBuiltIn
Definition: SoFieldContainer.h:97
SoFieldList
The SoFieldList class is a container for pointers to SoField objects.
Definition: SoFieldList.h:31
SbString
The SbString class is a string class with convenience functions for string operations.This is the class used for storing and working with character strings. It automatically takes care of supporting all the "bookkeeping" tasks usually associated with working with character strings, like memory allocation and deallocation etc.
Definition: SbString.h:42
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
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.