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) 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/misc/SoBase.h>
28 
29 class SbString;
30 class SoFieldData;
31 class SoFieldList;
32 class SoOutput;
33 
34 
35 class COIN_DLL_API SoFieldContainer : public SoBase {
36  typedef SoBase inherited;
37 
38 public:
39  static void initClass(void);
40  static SoType getClassTypeId(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 * in);
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  void setUserData(void * userdata) const;
88  void * getUserData(void) const;
89 
90 protected:
91  SoFieldContainer(void);
93 
94  virtual SbBool readInstance(SoInput * in, unsigned short flags);
95  SbBool isBuiltIn;
96 
97 private:
98  static SoType classTypeId;
99  SbBool donotify;
100 };
101 
102 #endif // !COIN_SOFIELDCONTAINER_H
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:41
virtual void addWriteReference(SoOutput *out, SbBool isfromfield=0)
Definition: SoBase.cpp:1002
The SoOutput class is an abstraction of an output stream.SoOutput offers the ability to write basic t...
Definition: SoOutput.h:42
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.h:35
The SoField class is the top-level abstract base class for fields.Fields is the mechanism used throug...
Definition: SoField.h:38
virtual void notify(SoNotList *l)
Definition: SoBase.cpp:909
virtual SbBool readInstance(SoInput *in, unsigned short flags)=0
static void initClass(void)
Definition: SoBase.cpp:455
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:55
static SoType getClassTypeId(void)
Definition: SoBase.cpp:720
The SoFieldData class is a container for a prototype set of fields.This class is instantiated once fo...
Definition: SoFieldData.h:39
SbBool isBuiltIn
Definition: SoFieldContainer.h:95
The SoFieldList class is a container for pointers to SoField objects.
Definition: SoFieldList.h:31
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
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
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
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31

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

Generated on Fri Jul 20 2018 for Coin by Doxygen. 1.8.14