Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# SoFieldContainer.h

    00001 #ifndef COIN_SOFIELDCONTAINER_H
    00002 #define COIN_SOFIELDCONTAINER_H
    00003
    00004 /**************************************************************************\
    00005  *
    00006  *  This file is part of the Coin 3D visualization library.
    00007  *  Copyright (C) 1998-2003 by Systems in Motion.  All rights reserved.
    00008  *
    00009  *  This library is free software; you can redistribute it and/or
    00010  *  modify it under the terms of the GNU General Public License
    00011  *  ("GPL") version 2 as published by the Free Software Foundation.
    00012  *  See the file LICENSE.GPL at the root directory of this source
    00013  *  distribution for additional information about the GNU GPL.
    00014  *
    00015  *  For using Coin with software that can not be combined with the GNU
    00016  *  GPL, and for taking advantage of the additional benefits of our
    00017  *  support services, please contact Systems in Motion about acquiring
    00018  *  a Coin Professional Edition License.
    00019  *
    00020  *  See <URL:http://www.coin3d.org> for  more information.
    00021  *
    00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
    00023  *  <URL:http://www.sim.no>.
    00024  *
    00025 \**************************************************************************/
    00026
    00027 #include <Inventor/misc/SoBase.h>
    00028
    00029 class SbString;
    00030 class SoFieldData;
    00031 class SoFieldList;
    00032 class SoOutput;
    00033
    00034
    00035 class COIN_DLL_API SoFieldContainer : public SoBase {
    00036   typedef SoBase inherited;
    00037
    00038 public:
    00039   static void initClass(void);
    00040   static SoType getClassTypeId(void);
    00041
    00042   void setToDefaults(void);
    00043   SbBool hasDefaultValues(void) const;
    00044
    00045   SbBool fieldsAreEqual(const SoFieldContainer * container) const;
    00046   void copyFieldValues(const SoFieldContainer * container,
    00047                        SbBool copyconnections = FALSE);
    00048
    00049   SbBool set(const char * const fielddata);
    00050   void get(SbString & fielddata);
    00051
    00052   virtual int getFields(SoFieldList & l) const;
    00053   virtual int getAllFields(SoFieldList & l) const;
    00054   virtual SoField * getField(const SbName & name) const;
    00055   virtual SoField * getEventIn(const SbName & name) const;
    00056   virtual SoField * getEventOut(const SbName & name) const;
    00057   SbBool getFieldName(const SoField * const field, SbName & name) const;
    00058
    00059   SbBool enableNotify(const SbBool flag);
    00060   SbBool isNotifyEnabled(void) const;
    00061
    00062   SbBool set(const char * fielddata, SoInput * in);
    00063   void get(SbString & fielddata, SoOutput * out);
    00064
    00065   virtual void notify(SoNotList * l);
    00066
    00067   virtual SbBool validateNewFieldValue(SoField * field, void * newval);
    00068
    00069   virtual void addWriteReference(SoOutput * out, SbBool isfromfield = FALSE);
    00070   virtual void writeInstance(SoOutput * out);
    00071
    00072   SbBool getIsBuiltIn(void) const;
    00073   virtual const SoFieldData * getFieldData(void) const;
    00074
    00075   virtual void copyContents(const SoFieldContainer * from,
    00076                             SbBool copyconnections);
    00077   virtual SoFieldContainer * copyThroughConnection(void) const;
    00078
    00079   static void initCopyDict(void);
    00080   static void addCopy(const SoFieldContainer * orig,
    00081                       const SoFieldContainer * copy);
    00082   static SoFieldContainer * checkCopy(const SoFieldContainer * orig);
    00083   static SoFieldContainer * findCopy(const SoFieldContainer * orig,
    00084                                      const SbBool copyconnections);
    00085   static void copyDone(void);
    00086
    00087   void setUserData(void * userdata) const;
    00088   void * getUserData(void) const;
    00089
    00090 protected:
    00091   SoFieldContainer(void);
    00092   ~SoFieldContainer();
    00093
    00094   virtual SbBool readInstance(SoInput * in, unsigned short flags);
    00095   SbBool isBuiltIn;
    00096
    00097 private:
    00098   static SoType classTypeId;
    00099   SbBool donotify;
    00100 };
    00101
    00102 #endif // !COIN_SOFIELDCONTAINER_H