Coin Logo 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
29class SbString;
30class SoFieldData;
31class SoFieldList;
32class SoOutput;
33
34class COIN_DLL_API SoFieldContainer : public SoBase {
35 typedef SoBase inherited;
36
37public:
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
92protected:
93 SoFieldContainer(void);
94 virtual ~SoFieldContainer();
95
96 virtual SbBool readInstance(SoInput * in, unsigned short flags);
97 SbBool isBuiltIn;
98
99private:
100 static SoType classTypeId;
101 SbBool donotify;
102
103}; // SoFieldContainer
104
105#endif // !COIN_SOFIELDCONTAINER_H
The SbName class stores strings by reference.
Definition SbName.h:31
The SbString class is a string class with convenience functions for string operations.
Definition SbString.h:42
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition SoBase.h:36
virtual void addWriteReference(SoOutput *out, SbBool isfromfield=FALSE)
Definition SoBase.cpp:871
static SoType getClassTypeId(void)
Definition SoBase.cpp:616
static void initClass(void)
Definition SoBase.cpp:338
virtual void notify(SoNotList *l)
Definition SoBase.cpp:778
virtual SbBool readInstance(SoInput *input, unsigned short flags)=0
The SoFieldContainer class is a base class for all classes that contain fields.
Definition SoFieldContainer.h:34
SbBool isBuiltIn
Definition SoFieldContainer.h:97
The SoFieldData class is a container for a prototype set of fields.
Definition SoFieldData.h:39
The SoFieldList class is a container for pointers to SoField objects.
Definition SoFieldList.h:31
The SoField class is the top-level abstract base class for fields.
Definition SoField.h:38
The SoInput class is an abstraction of file import functionality.
Definition SoInput.h:52
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:34
The SoOutput class is an abstraction of an output stream.
Definition SoOutput.h:42
The SoType class is the basis for the run-time type system in Coin.
Definition SoType.h:50

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

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.