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

OSGGraphicStatisticsForegroundBase.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class GraphicStatisticsForeground
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGGRAPHICSTATISTICSFOREGROUNDBASE_H_
00055 #define _OSGGRAPHICSTATISTICSFOREGROUNDBASE_H_
00056 #ifdef __sgi
00057 #pragma once
00058 #endif
00059 
00060 
00061 #include <OSGConfig.h>
00062 #include <OSGSystemDef.h>
00063 
00064 #include <OSGBaseTypes.h>
00065 #include <OSGRefPtr.h>
00066 #include <OSGCoredNodePtr.h>
00067 
00068 #include <OSGStatisticsForeground.h> // Parent
00069 
00070 #include <OSGUInt32Fields.h> // DisplayType type
00071 #include <OSGVec2fFields.h> // Size type
00072 #include <OSGVec2fFields.h> // Pos type
00073 #include <OSGColor4fFields.h> // ColorMax type
00074 #include <OSGColor4fFields.h> // ColorMin type
00075 #include <OSGColor4fFields.h> // ColorCurrent type
00076 #include <OSGReal32Fields.h> // MinValue type
00077 #include <OSGReal32Fields.h> // MaxValue type
00078 #include <OSGUInt32Fields.h> // Flags type
00079 #include <OSGUInt32Fields.h> // HistorySize type
00080 #include <OSGStringFields.h> // Description type
00081 #include <OSGReal32Fields.h> // LineWidth type
00082 #include <OSGColor3fFields.h> // BackgroundColor type
00083 #include <OSGBoolFields.h> // TextEnabled type
00084 #include <OSGBoolFields.h> // BackgroundEnabled type
00085 #include <OSGBoolFields.h> // BorderEnabled type
00086 
00087 #include <OSGGraphicStatisticsForegroundFields.h>
00088 
00089 OSG_BEGIN_NAMESPACE
00090 
00091 class GraphicStatisticsForeground;
00092 class BinaryDataHandler;
00093 
00095 
00096 class OSG_SYSTEMLIB_DLLMAPPING GraphicStatisticsForegroundBase : public StatisticsForeground
00097 {
00098   private:
00099 
00100     typedef StatisticsForeground    Inherited;
00101 
00102     /*==========================  PUBLIC  =================================*/
00103   public:
00104 
00105     typedef GraphicStatisticsForegroundPtr  Ptr;
00106 
00107     enum
00108     {
00109         DisplayTypeFieldId       = Inherited::NextFieldId,
00110         SizeFieldId              = DisplayTypeFieldId       + 1,
00111         PosFieldId               = SizeFieldId              + 1,
00112         ColorMaxFieldId          = PosFieldId               + 1,
00113         ColorMinFieldId          = ColorMaxFieldId          + 1,
00114         ColorCurrentFieldId      = ColorMinFieldId          + 1,
00115         MinValueFieldId          = ColorCurrentFieldId      + 1,
00116         MaxValueFieldId          = MinValueFieldId          + 1,
00117         FlagsFieldId             = MaxValueFieldId          + 1,
00118         HistorySizeFieldId       = FlagsFieldId             + 1,
00119         DescriptionFieldId       = HistorySizeFieldId       + 1,
00120         LineWidthFieldId         = DescriptionFieldId       + 1,
00121         BackgroundColorFieldId   = LineWidthFieldId         + 1,
00122         TextEnabledFieldId       = BackgroundColorFieldId   + 1,
00123         BackgroundEnabledFieldId = TextEnabledFieldId       + 1,
00124         BorderEnabledFieldId     = BackgroundEnabledFieldId + 1,
00125         NextFieldId              = BorderEnabledFieldId     + 1
00126     };
00127 
00128     static const OSG::BitVector DisplayTypeFieldMask;
00129     static const OSG::BitVector SizeFieldMask;
00130     static const OSG::BitVector PosFieldMask;
00131     static const OSG::BitVector ColorMaxFieldMask;
00132     static const OSG::BitVector ColorMinFieldMask;
00133     static const OSG::BitVector ColorCurrentFieldMask;
00134     static const OSG::BitVector MinValueFieldMask;
00135     static const OSG::BitVector MaxValueFieldMask;
00136     static const OSG::BitVector FlagsFieldMask;
00137     static const OSG::BitVector HistorySizeFieldMask;
00138     static const OSG::BitVector DescriptionFieldMask;
00139     static const OSG::BitVector LineWidthFieldMask;
00140     static const OSG::BitVector BackgroundColorFieldMask;
00141     static const OSG::BitVector TextEnabledFieldMask;
00142     static const OSG::BitVector BackgroundEnabledFieldMask;
00143     static const OSG::BitVector BorderEnabledFieldMask;
00144 
00145 
00146     static const OSG::BitVector MTInfluenceMask;
00147 
00148     /*---------------------------------------------------------------------*/
00152     static        FieldContainerType &getClassType    (void); 
00153     static        UInt32              getClassTypeId  (void); 
00154 
00156     /*---------------------------------------------------------------------*/
00160     virtual       FieldContainerType &getType  (void); 
00161     virtual const FieldContainerType &getType  (void) const; 
00162 
00163     virtual       UInt32              getContainerSize(void) const;
00164 
00166     /*---------------------------------------------------------------------*/
00170            MFString            *getMFDescription    (void);
00171            SFReal32            *getSFLineWidth      (void);
00172            SFColor3f           *getSFBackgroundColor(void);
00173            SFBool              *getSFTextEnabled    (void);
00174            SFBool              *getSFBackgroundEnabled(void);
00175            SFBool              *getSFBorderEnabled  (void);
00176 
00177            Real32              &getLineWidth      (void);
00178      const Real32              &getLineWidth      (void) const;
00179            Color3f             &getBackgroundColor(void);
00180      const Color3f             &getBackgroundColor(void) const;
00181            bool                &getTextEnabled    (void);
00182      const bool                &getTextEnabled    (void) const;
00183            bool                &getBackgroundEnabled(void);
00184      const bool                &getBackgroundEnabled(void) const;
00185            bool                &getBorderEnabled  (void);
00186      const bool                &getBorderEnabled  (void) const;
00187            std::string         &getDescription    (const UInt32 index);
00188            MFString            &getDescription    (void);
00189      const MFString            &getDescription    (void) const;
00190 
00192     /*---------------------------------------------------------------------*/
00196      void setLineWidth      ( const Real32 &value );
00197      void setBackgroundColor( const Color3f &value );
00198      void setTextEnabled    ( const bool &value );
00199      void setBackgroundEnabled( const bool &value );
00200      void setBorderEnabled  ( const bool &value );
00201 
00203     /*---------------------------------------------------------------------*/
00208     /*---------------------------------------------------------------------*/
00212     virtual UInt32 getBinSize (const BitVector         &whichField);
00213     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00214                                const BitVector         &whichField);
00215     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00216                                const BitVector         &whichField);
00217 
00218 
00220     /*---------------------------------------------------------------------*/
00224     static  GraphicStatisticsForegroundPtr      create          (void); 
00225     static  GraphicStatisticsForegroundPtr      createEmpty     (void); 
00226 
00229     /*---------------------------------------------------------------------*/
00233     virtual FieldContainerPtr     shallowCopy     (void) const; 
00234 
00236     /*=========================  PROTECTED  ===============================*/
00237   protected:
00238 
00239     /*---------------------------------------------------------------------*/
00243     MFUInt32            _mfDisplayType;
00244     MFVec2f             _mfSize;
00245     MFVec2f             _mfPos;
00246     MFColor4f           _mfColorMax;
00247     MFColor4f           _mfColorMin;
00248     MFColor4f           _mfColorCurrent;
00249     MFReal32            _mfMinValue;
00250     MFReal32            _mfMaxValue;
00251     MFUInt32            _mfFlags;
00252     MFUInt32            _mfHistorySize;
00253     MFString            _mfDescription;
00254     SFReal32            _sfLineWidth;
00255     SFColor3f           _sfBackgroundColor;
00256     SFBool              _sfTextEnabled;
00257     SFBool              _sfBackgroundEnabled;
00258     SFBool              _sfBorderEnabled;
00259 
00261     /*---------------------------------------------------------------------*/
00265     GraphicStatisticsForegroundBase(void);
00266     GraphicStatisticsForegroundBase(const GraphicStatisticsForegroundBase &source);
00267 
00269     /*---------------------------------------------------------------------*/
00273     virtual ~GraphicStatisticsForegroundBase(void); 
00274 
00276     /*---------------------------------------------------------------------*/
00280            MFUInt32            *getMFDisplayType    (void);
00281            MFVec2f             *getMFSize           (void);
00282            MFVec2f             *getMFPos            (void);
00283            MFColor4f           *getMFColorMax       (void);
00284            MFColor4f           *getMFColorMin       (void);
00285            MFColor4f           *getMFColorCurrent   (void);
00286            MFReal32            *getMFMinValue       (void);
00287            MFReal32            *getMFMaxValue       (void);
00288            MFUInt32            *getMFFlags          (void);
00289            MFUInt32            *getMFHistorySize    (void);
00290 
00291            UInt32              &getDisplayType    (UInt32 index);
00292            MFUInt32            &getDisplayType    (void);
00293      const MFUInt32            &getDisplayType    (void) const;
00294            Vec2f               &getSize           (UInt32 index);
00295            MFVec2f             &getSize           (void);
00296      const MFVec2f             &getSize           (void) const;
00297            Vec2f               &getPos            (UInt32 index);
00298            MFVec2f             &getPos            (void);
00299      const MFVec2f             &getPos            (void) const;
00300            Color4f             &getColorMax       (UInt32 index);
00301            MFColor4f           &getColorMax       (void);
00302      const MFColor4f           &getColorMax       (void) const;
00303            Color4f             &getColorMin       (UInt32 index);
00304            MFColor4f           &getColorMin       (void);
00305      const MFColor4f           &getColorMin       (void) const;
00306            Color4f             &getColorCurrent   (UInt32 index);
00307            MFColor4f           &getColorCurrent   (void);
00308      const MFColor4f           &getColorCurrent   (void) const;
00309            Real32              &getMinValue       (UInt32 index);
00310            MFReal32            &getMinValue       (void);
00311      const MFReal32            &getMinValue       (void) const;
00312            Real32              &getMaxValue       (UInt32 index);
00313            MFReal32            &getMaxValue       (void);
00314      const MFReal32            &getMaxValue       (void) const;
00315            UInt32              &getFlags          (UInt32 index);
00316            MFUInt32            &getFlags          (void);
00317      const MFUInt32            &getFlags          (void) const;
00318            UInt32              &getHistorySize    (UInt32 index);
00319            MFUInt32            &getHistorySize    (void);
00320      const MFUInt32            &getHistorySize    (void) const;
00321 
00323     /*---------------------------------------------------------------------*/
00329     /*---------------------------------------------------------------------*/
00333 #if !defined(OSG_FIXED_MFIELDSYNC)
00334     void executeSyncImpl(      GraphicStatisticsForegroundBase *pOther,
00335                          const BitVector         &whichField);
00336 
00337     virtual void   executeSync(      FieldContainer    &other,
00338                                const BitVector         &whichField);
00339 #else
00340     void executeSyncImpl(      GraphicStatisticsForegroundBase *pOther,
00341                          const BitVector         &whichField,
00342                          const SyncInfo          &sInfo     );
00343 
00344     virtual void   executeSync(      FieldContainer    &other,
00345                                const BitVector         &whichField,
00346                                const SyncInfo          &sInfo);
00347 
00348     virtual void execBeginEdit     (const BitVector &whichField,
00349                                           UInt32     uiAspect,
00350                                           UInt32     uiContainerSize);
00351 
00352             void execBeginEditImpl (const BitVector &whichField,
00353                                           UInt32     uiAspect,
00354                                           UInt32     uiContainerSize);
00355 
00356     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00357 #endif
00358 
00360     /*==========================  PRIVATE  ================================*/
00361   private:
00362 
00363     friend class FieldContainer;
00364 
00365     static FieldDescription   *_desc[];
00366     static FieldContainerType  _type;
00367 
00368 
00369     // prohibit default functions (move to 'public' if you need one)
00370     void operator =(const GraphicStatisticsForegroundBase &source);
00371 };
00372 
00373 //---------------------------------------------------------------------------
00374 //   Exported Types
00375 //---------------------------------------------------------------------------
00376 
00377 
00378 typedef GraphicStatisticsForegroundBase *GraphicStatisticsForegroundBaseP;
00379 
00380 typedef osgIF<GraphicStatisticsForegroundBase::isNodeCore,
00381               CoredNodePtr<GraphicStatisticsForeground>,
00382               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00383               >::_IRet GraphicStatisticsForegroundNodePtr;
00384 
00385 typedef RefPtr<GraphicStatisticsForegroundPtr> GraphicStatisticsForegroundRefPtr;
00386 
00387 OSG_END_NAMESPACE
00388 
00389 #define OSGGRAPHICSTATISTICSFOREGROUNDBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00390 
00391 #endif /* _OSGGRAPHICSTATISTICSFOREGROUNDBASE_H_ */

Generated on Thu Aug 25 04:05:52 2005 for OpenSG by  doxygen 1.4.3