00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef _OSGBACKGROUNDBASE_H_
00055 #define _OSGBACKGROUNDBASE_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 <OSGAttachmentContainer.h>
00069
00070
00071 #include <OSGBackgroundFields.h>
00072
00073 OSG_BEGIN_NAMESPACE
00074
00075 class Background;
00076 class BinaryDataHandler;
00077
00079
00080 class OSG_SYSTEMLIB_DLLMAPPING BackgroundBase : public AttachmentContainer
00081 {
00082 private:
00083
00084 typedef AttachmentContainer Inherited;
00085
00086
00087 public:
00088
00089 typedef BackgroundPtr Ptr;
00090
00091
00092 static const OSG::BitVector MTInfluenceMask;
00093
00094
00098 static FieldContainerType &getClassType (void);
00099 static UInt32 getClassTypeId (void);
00100
00102
00106 virtual FieldContainerType &getType (void);
00107 virtual const FieldContainerType &getType (void) const;
00108
00109 virtual UInt32 getContainerSize(void) const;
00110
00112
00117
00121 virtual UInt32 getBinSize (const BitVector &whichField);
00122 virtual void copyToBin ( BinaryDataHandler &pMem,
00123 const BitVector &whichField);
00124 virtual void copyFromBin( BinaryDataHandler &pMem,
00125 const BitVector &whichField);
00126
00127
00129
00130 protected:
00131
00132
00136 BackgroundBase(void);
00137 BackgroundBase(const BackgroundBase &source);
00138
00140
00144 virtual ~BackgroundBase(void);
00145
00147
00151 #if !defined(OSG_FIXED_MFIELDSYNC)
00152 void executeSyncImpl( BackgroundBase *pOther,
00153 const BitVector &whichField);
00154
00155 virtual void executeSync( FieldContainer &other,
00156 const BitVector &whichField);
00157 #else
00158 void executeSyncImpl( BackgroundBase *pOther,
00159 const BitVector &whichField,
00160 const SyncInfo &sInfo );
00161
00162 virtual void executeSync( FieldContainer &other,
00163 const BitVector &whichField,
00164 const SyncInfo &sInfo);
00165
00166 virtual void execBeginEdit (const BitVector &whichField,
00167 UInt32 uiAspect,
00168 UInt32 uiContainerSize);
00169
00170 void execBeginEditImpl (const BitVector &whichField,
00171 UInt32 uiAspect,
00172 UInt32 uiContainerSize);
00173
00174 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00175 #endif
00176
00178
00179 private:
00180
00181 friend class FieldContainer;
00182
00183 static FieldContainerType _type;
00184
00185
00186
00187 void operator =(const BackgroundBase &source);
00188 };
00189
00190
00191
00192
00193
00194
00195 typedef BackgroundBase *BackgroundBaseP;
00196
00197 typedef osgIF<BackgroundBase::isNodeCore,
00198 CoredNodePtr<Background>,
00199 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00200 >::_IRet BackgroundNodePtr;
00201
00202 typedef RefPtr<BackgroundPtr> BackgroundRefPtr;
00203
00204 OSG_END_NAMESPACE
00205
00206 #define OSGBACKGROUNDBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00207
00208 #endif