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 _OSGPROXYGROUPBASE_H_
00055 #define _OSGPROXYGROUPBASE_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 <OSGGroup.h>
00069
00070 #include <OSGBoolFields.h>
00071 #include <OSGStringFields.h>
00072 #include <OSGNodeFields.h>
00073 #include <OSGUInt32Fields.h>
00074 #include <OSGBoolFields.h>
00075 #include <OSGDynamicVolumeFields.h>
00076 #include <OSGUInt32Fields.h>
00077 #include <OSGUInt32Fields.h>
00078 #include <OSGUInt32Fields.h>
00079 #include <OSGUInt32Fields.h>
00080 #include <OSGStringFields.h>
00081 #include <OSGUInt8Fields.h>
00082
00083 #include <OSGProxyGroupFields.h>
00084
00085 OSG_BEGIN_NAMESPACE
00086
00087 class ProxyGroup;
00088 class BinaryDataHandler;
00089
00091
00092 class OSG_SYSTEMLIB_DLLMAPPING ProxyGroupBase : public Group
00093 {
00094 private:
00095
00096 typedef Group Inherited;
00097
00098
00099 public:
00100
00101 typedef ProxyGroupPtr Ptr;
00102
00103 enum
00104 {
00105 EnabledFieldId = Inherited::NextFieldId,
00106 UrlFieldId = EnabledFieldId + 1,
00107 RootFieldId = UrlFieldId + 1,
00108 StateFieldId = RootFieldId + 1,
00109 ConcurrentLoadFieldId = StateFieldId + 1,
00110 VolumeFieldId = ConcurrentLoadFieldId + 1,
00111 IndicesFieldId = VolumeFieldId + 1,
00112 TrianglesFieldId = IndicesFieldId + 1,
00113 PositionsFieldId = TrianglesFieldId + 1,
00114 GeometriesFieldId = PositionsFieldId + 1,
00115 AbsoluteUrlFieldId = GeometriesFieldId + 1,
00116 InlineFieldId = AbsoluteUrlFieldId + 1,
00117 NextFieldId = InlineFieldId + 1
00118 };
00119
00120 static const OSG::BitVector EnabledFieldMask;
00121 static const OSG::BitVector UrlFieldMask;
00122 static const OSG::BitVector RootFieldMask;
00123 static const OSG::BitVector StateFieldMask;
00124 static const OSG::BitVector ConcurrentLoadFieldMask;
00125 static const OSG::BitVector VolumeFieldMask;
00126 static const OSG::BitVector IndicesFieldMask;
00127 static const OSG::BitVector TrianglesFieldMask;
00128 static const OSG::BitVector PositionsFieldMask;
00129 static const OSG::BitVector GeometriesFieldMask;
00130 static const OSG::BitVector AbsoluteUrlFieldMask;
00131 static const OSG::BitVector InlineFieldMask;
00132
00133
00134 static const OSG::BitVector MTInfluenceMask;
00135
00136
00140 static FieldContainerType &getClassType (void);
00141 static UInt32 getClassTypeId (void);
00142
00144
00148 virtual FieldContainerType &getType (void);
00149 virtual const FieldContainerType &getType (void) const;
00150
00151 virtual UInt32 getContainerSize(void) const;
00152
00154
00158 SFBool *getSFEnabled (void);
00159 SFString *getSFUrl (void);
00160 SFNodePtr *getSFRoot (void);
00161 SFUInt32 *getSFState (void);
00162 SFBool *getSFConcurrentLoad (void);
00163 SFDynamicVolume *getSFVolume (void);
00164 SFUInt32 *getSFIndices (void);
00165 SFUInt32 *getSFTriangles (void);
00166 SFUInt32 *getSFPositions (void);
00167 SFUInt32 *getSFGeometries (void);
00168 MFUInt8 *getMFInline (void);
00169
00170 bool &getEnabled (void);
00171 const bool &getEnabled (void) const;
00172 std::string &getUrl (void);
00173 const std::string &getUrl (void) const;
00174 NodePtr &getRoot (void);
00175 const NodePtr &getRoot (void) const;
00176 UInt32 &getState (void);
00177 const UInt32 &getState (void) const;
00178 bool &getConcurrentLoad (void);
00179 const bool &getConcurrentLoad (void) const;
00180 DynamicVolume &getVolume (void);
00181 const DynamicVolume &getVolume (void) const;
00182 UInt32 &getIndices (void);
00183 const UInt32 &getIndices (void) const;
00184 UInt32 &getTriangles (void);
00185 const UInt32 &getTriangles (void) const;
00186 UInt32 &getPositions (void);
00187 const UInt32 &getPositions (void) const;
00188 UInt32 &getGeometries (void);
00189 const UInt32 &getGeometries (void) const;
00190 UInt8 &getInline (const UInt32 index);
00191 MFUInt8 &getInline (void);
00192 const MFUInt8 &getInline (void) const;
00193
00195
00199 void setEnabled ( const bool &value );
00200 void setUrl ( const std::string &value );
00201 void setRoot ( const NodePtr &value );
00202 void setState ( const UInt32 &value );
00203 void setConcurrentLoad ( const bool &value );
00204 void setVolume ( const DynamicVolume &value );
00205 void setIndices ( const UInt32 &value );
00206 void setTriangles ( const UInt32 &value );
00207 void setPositions ( const UInt32 &value );
00208 void setGeometries ( const UInt32 &value );
00209
00211
00216
00220 virtual UInt32 getBinSize (const BitVector &whichField);
00221 virtual void copyToBin ( BinaryDataHandler &pMem,
00222 const BitVector &whichField);
00223 virtual void copyFromBin( BinaryDataHandler &pMem,
00224 const BitVector &whichField);
00225
00226
00228
00232 static ProxyGroupPtr create (void);
00233 static ProxyGroupPtr createEmpty (void);
00234
00237
00241 virtual FieldContainerPtr shallowCopy (void) const;
00242
00244
00245 protected:
00246
00247
00251 SFBool _sfEnabled;
00252 SFString _sfUrl;
00253 SFNodePtr _sfRoot;
00254 SFUInt32 _sfState;
00255 SFBool _sfConcurrentLoad;
00256 SFDynamicVolume _sfVolume;
00257 SFUInt32 _sfIndices;
00258 SFUInt32 _sfTriangles;
00259 SFUInt32 _sfPositions;
00260 SFUInt32 _sfGeometries;
00261 SFString _sfAbsoluteUrl;
00262 MFUInt8 _mfInline;
00263
00265
00269 ProxyGroupBase(void);
00270 ProxyGroupBase(const ProxyGroupBase &source);
00271
00273
00277 virtual ~ProxyGroupBase(void);
00278
00280
00284 SFString *getSFAbsoluteUrl (void);
00285
00286 std::string &getAbsoluteUrl (void);
00287 const std::string &getAbsoluteUrl (void) const;
00288
00290
00294 void setAbsoluteUrl (const std::string &value);
00295
00297
00301 #if !defined(OSG_FIXED_MFIELDSYNC)
00302 void executeSyncImpl( ProxyGroupBase *pOther,
00303 const BitVector &whichField);
00304
00305 virtual void executeSync( FieldContainer &other,
00306 const BitVector &whichField);
00307 #else
00308 void executeSyncImpl( ProxyGroupBase *pOther,
00309 const BitVector &whichField,
00310 const SyncInfo &sInfo );
00311
00312 virtual void executeSync( FieldContainer &other,
00313 const BitVector &whichField,
00314 const SyncInfo &sInfo);
00315
00316 virtual void execBeginEdit (const BitVector &whichField,
00317 UInt32 uiAspect,
00318 UInt32 uiContainerSize);
00319
00320 void execBeginEditImpl (const BitVector &whichField,
00321 UInt32 uiAspect,
00322 UInt32 uiContainerSize);
00323
00324 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00325 #endif
00326
00328
00329 private:
00330
00331 friend class FieldContainer;
00332
00333 static FieldDescription *_desc[];
00334 static FieldContainerType _type;
00335
00336
00337
00338 void operator =(const ProxyGroupBase &source);
00339 };
00340
00341
00342
00343
00344
00345
00346 typedef ProxyGroupBase *ProxyGroupBaseP;
00347
00348 typedef osgIF<ProxyGroupBase::isNodeCore,
00349 CoredNodePtr<ProxyGroup>,
00350 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00351 >::_IRet ProxyGroupNodePtr;
00352
00353 typedef RefPtr<ProxyGroupPtr> ProxyGroupRefPtr;
00354
00355 OSG_END_NAMESPACE
00356
00357 #define OSGPROXYGROUPBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.40 2005/07/20 00:10:14 vossg Exp $"
00358
00359 #endif