00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COIN_SOFIELDCONTAINER_H
00021 #define COIN_SOFIELDCONTAINER_H
00022
00023 #include <Inventor/misc/SoBase.h>
00024
00025 class SbString;
00026 class SoFieldData;
00027 class SoFieldList;
00028 class SoOutput;
00029
00030
00031 class COIN_DLL_API SoFieldContainer : public SoBase {
00032 typedef SoBase inherited;
00033
00034 public:
00035 static void initClass(void);
00036 static SoType getClassTypeId(void);
00037
00038 void setToDefaults(void);
00039 SbBool hasDefaultValues(void) const;
00040
00041 SbBool fieldsAreEqual(const SoFieldContainer * container) const;
00042 void copyFieldValues(const SoFieldContainer * container,
00043 SbBool copyconnections = FALSE);
00044
00045 SbBool set(const char * const fielddata);
00046 void get(SbString & fielddata);
00047
00048 virtual int getFields(SoFieldList & l) const;
00049 virtual int getAllFields(SoFieldList & l) const;
00050 virtual SoField * getField(const SbName & name) const;
00051 virtual SoField * getEventIn(const SbName & name) const;
00052 virtual SoField * getEventOut(const SbName & name) const;
00053 SbBool getFieldName(const SoField * const field, SbName & name) const;
00054
00055 SbBool enableNotify(const SbBool flag);
00056 SbBool isNotifyEnabled(void) const;
00057
00058 SbBool set(const char * fielddata, SoInput * in);
00059 void get(SbString & fielddata, SoOutput * out);
00060
00061 virtual void notify(SoNotList * l);
00062
00063 virtual SbBool validateNewFieldValue(SoField * field, void * newval);
00064
00065 virtual void addWriteReference(SoOutput * out, SbBool isfromfield = FALSE);
00066 virtual void writeInstance(SoOutput * out);
00067
00068 SbBool getIsBuiltIn(void) const;
00069 virtual const SoFieldData * getFieldData(void) const;
00070
00071 virtual void copyContents(const SoFieldContainer * from,
00072 SbBool copyconnections);
00073 virtual SoFieldContainer * copyThroughConnection(void) const;
00074
00075 static void initCopyDict(void);
00076 static void addCopy(const SoFieldContainer * orig,
00077 const SoFieldContainer * copy);
00078 static SoFieldContainer * checkCopy(const SoFieldContainer * orig);
00079 static SoFieldContainer * findCopy(const SoFieldContainer * orig,
00080 const SbBool copyconnections);
00081 static void copyDone(void);
00082
00083 protected:
00084 SoFieldContainer(void);
00085 ~SoFieldContainer();
00086
00087 virtual SbBool readInstance(SoInput * in, unsigned short flags);
00088 SbBool isBuiltIn;
00089
00090 private:
00091 static SoType classTypeId;
00092 SbBool donotify;
00093 };
00094
00095 #endif // !COIN_SOFIELDCONTAINER_H