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 _OSGCLUSTERWINDOWBASE_H_
00055 #define _OSGCLUSTERWINDOWBASE_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 <OSGWindow.h>
00069
00070 #include <OSGStringFields.h>
00071 #include <OSGStringFields.h>
00072 #include <OSGStringFields.h>
00073 #include <OSGStringFields.h>
00074 #include <OSGStringFields.h>
00075 #include <OSGUInt32Fields.h>
00076 #include <OSGStringFields.h>
00077 #include <OSGStringFields.h>
00078 #include <OSGWindowFields.h>
00079 #include <OSGUInt32Fields.h>
00080 #include <OSGUInt32Fields.h>
00081 #include <OSGImageComposerFields.h>
00082 #include <OSGStringFields.h>
00083 #include <OSGDisplayCalibrationFields.h>
00084 #include <OSGDisplayFilterForegroundFields.h>
00085 #include <OSGBoolFields.h>
00086
00087 #include <OSGClusterWindowFields.h>
00088
00089 OSG_BEGIN_NAMESPACE
00090
00091 class ClusterWindow;
00092 class BinaryDataHandler;
00093
00095
00096 class OSG_SYSTEMLIB_DLLMAPPING ClusterWindowBase : public Window
00097 {
00098 private:
00099
00100 typedef Window Inherited;
00101
00102
00103 public:
00104
00105 typedef ClusterWindowPtr Ptr;
00106
00107 enum
00108 {
00109 ServersFieldId = Inherited::NextFieldId,
00110 ConnectionTypeFieldId = ServersFieldId + 1,
00111 ConnectionInterfaceFieldId = ConnectionTypeFieldId + 1,
00112 ConnectionDestinationFieldId = ConnectionInterfaceFieldId + 1,
00113 ConnectionParamsFieldId = ConnectionDestinationFieldId + 1,
00114 ServicePortFieldId = ConnectionParamsFieldId + 1,
00115 ServiceAddressFieldId = ServicePortFieldId + 1,
00116 ServiceInterfaceFieldId = ServiceAddressFieldId + 1,
00117 ClientWindowFieldId = ServiceInterfaceFieldId + 1,
00118 InterleaveFieldId = ClientWindowFieldId + 1,
00119 FrameCountFieldId = InterleaveFieldId + 1,
00120 ComposerFieldId = FrameCountFieldId + 1,
00121 AutostartFieldId = ComposerFieldId + 1,
00122 CalibrationFieldId = AutostartFieldId + 1,
00123 FilterFieldId = CalibrationFieldId + 1,
00124 DirtyFieldId = FilterFieldId + 1,
00125 NextFieldId = DirtyFieldId + 1
00126 };
00127
00128 static const OSG::BitVector ServersFieldMask;
00129 static const OSG::BitVector ConnectionTypeFieldMask;
00130 static const OSG::BitVector ConnectionInterfaceFieldMask;
00131 static const OSG::BitVector ConnectionDestinationFieldMask;
00132 static const OSG::BitVector ConnectionParamsFieldMask;
00133 static const OSG::BitVector ServicePortFieldMask;
00134 static const OSG::BitVector ServiceAddressFieldMask;
00135 static const OSG::BitVector ServiceInterfaceFieldMask;
00136 static const OSG::BitVector ClientWindowFieldMask;
00137 static const OSG::BitVector InterleaveFieldMask;
00138 static const OSG::BitVector FrameCountFieldMask;
00139 static const OSG::BitVector ComposerFieldMask;
00140 static const OSG::BitVector AutostartFieldMask;
00141 static const OSG::BitVector CalibrationFieldMask;
00142 static const OSG::BitVector FilterFieldMask;
00143 static const OSG::BitVector DirtyFieldMask;
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 *getMFServers (void);
00171 SFString *getSFConnectionType (void);
00172 SFString *getSFConnectionInterface(void);
00173 SFString *getSFConnectionDestination(void);
00174 SFString *getSFConnectionParams(void);
00175 SFUInt32 *getSFServicePort (void);
00176 SFString *getSFServiceAddress (void);
00177 SFString *getSFServiceInterface(void);
00178 SFWindowPtr *getSFClientWindow (void);
00179 SFUInt32 *getSFInterleave (void);
00180 SFUInt32 *getSFFrameCount (void);
00181 SFImageComposerPtr *getSFComposer (void);
00182 MFString *getMFAutostart (void);
00183 MFDisplayCalibrationPtr *getMFCalibration (void);
00184 MFDisplayFilterForegroundPtr *getMFFilter (void);
00185
00186 std::string &getConnectionType (void);
00187 const std::string &getConnectionType (void) const;
00188 std::string &getConnectionInterface(void);
00189 const std::string &getConnectionInterface(void) const;
00190 std::string &getConnectionDestination(void);
00191 const std::string &getConnectionDestination(void) const;
00192 std::string &getConnectionParams(void);
00193 const std::string &getConnectionParams(void) const;
00194 UInt32 &getServicePort (void);
00195 const UInt32 &getServicePort (void) const;
00196 std::string &getServiceAddress (void);
00197 const std::string &getServiceAddress (void) const;
00198 std::string &getServiceInterface(void);
00199 const std::string &getServiceInterface(void) const;
00200 WindowPtr &getClientWindow (void);
00201 const WindowPtr &getClientWindow (void) const;
00202 UInt32 &getInterleave (void);
00203 const UInt32 &getInterleave (void) const;
00204 UInt32 &getFrameCount (void);
00205 const UInt32 &getFrameCount (void) const;
00206 ImageComposerPtr &getComposer (void);
00207 const ImageComposerPtr &getComposer (void) const;
00208 std::string &getServers (const UInt32 index);
00209 MFString &getServers (void);
00210 const MFString &getServers (void) const;
00211 std::string &getAutostart (const UInt32 index);
00212 MFString &getAutostart (void);
00213 const MFString &getAutostart (void) const;
00214 DisplayCalibrationPtr &getCalibration (const UInt32 index);
00215 MFDisplayCalibrationPtr &getCalibration (void);
00216 const MFDisplayCalibrationPtr &getCalibration (void) const;
00217 DisplayFilterForegroundPtr &getFilter (const UInt32 index);
00218 MFDisplayFilterForegroundPtr &getFilter (void);
00219 const MFDisplayFilterForegroundPtr &getFilter (void) const;
00220
00222
00226 void setConnectionType ( const std::string &value );
00227 void setConnectionInterface( const std::string &value );
00228 void setConnectionDestination( const std::string &value );
00229 void setConnectionParams( const std::string &value );
00230 void setServicePort ( const UInt32 &value );
00231 void setServiceAddress ( const std::string &value );
00232 void setServiceInterface( const std::string &value );
00233 void setClientWindow ( const WindowPtr &value );
00234 void setInterleave ( const UInt32 &value );
00235 void setFrameCount ( const UInt32 &value );
00236 void setComposer ( const ImageComposerPtr &value );
00237
00239
00244
00248 virtual UInt32 getBinSize (const BitVector &whichField);
00249 virtual void copyToBin ( BinaryDataHandler &pMem,
00250 const BitVector &whichField);
00251 virtual void copyFromBin( BinaryDataHandler &pMem,
00252 const BitVector &whichField);
00253
00254
00256
00260 static ClusterWindowPtr create (void);
00261 static ClusterWindowPtr createEmpty (void);
00262
00265
00269 virtual FieldContainerPtr shallowCopy (void) const;
00270
00272
00273 protected:
00274
00275
00279 MFString _mfServers;
00280 SFString _sfConnectionType;
00281 SFString _sfConnectionInterface;
00282 SFString _sfConnectionDestination;
00283 SFString _sfConnectionParams;
00284 SFUInt32 _sfServicePort;
00285 SFString _sfServiceAddress;
00286 SFString _sfServiceInterface;
00287 SFWindowPtr _sfClientWindow;
00288 SFUInt32 _sfInterleave;
00289 SFUInt32 _sfFrameCount;
00290 SFImageComposerPtr _sfComposer;
00291 MFString _mfAutostart;
00292 MFDisplayCalibrationPtr _mfCalibration;
00293 MFDisplayFilterForegroundPtr _mfFilter;
00294 SFBool _sfDirty;
00295
00297
00301 ClusterWindowBase(void);
00302 ClusterWindowBase(const ClusterWindowBase &source);
00303
00305
00309 virtual ~ClusterWindowBase(void);
00310
00312
00316 SFBool *getSFDirty (void);
00317
00318 bool &getDirty (void);
00319 const bool &getDirty (void) const;
00320
00322
00326 void setDirty (const bool &value);
00327
00329
00333 #if !defined(OSG_FIXED_MFIELDSYNC)
00334 void executeSyncImpl( ClusterWindowBase *pOther,
00335 const BitVector &whichField);
00336
00337 virtual void executeSync( FieldContainer &other,
00338 const BitVector &whichField);
00339 #else
00340 void executeSyncImpl( ClusterWindowBase *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
00361 private:
00362
00363 friend class FieldContainer;
00364
00365 static FieldDescription *_desc[];
00366 static FieldContainerType _type;
00367
00368
00369
00370 void operator =(const ClusterWindowBase &source);
00371 };
00372
00373
00374
00375
00376
00377
00378 typedef ClusterWindowBase *ClusterWindowBaseP;
00379
00380 typedef osgIF<ClusterWindowBase::isNodeCore,
00381 CoredNodePtr<ClusterWindow>,
00382 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00383 >::_IRet ClusterWindowNodePtr;
00384
00385 typedef RefPtr<ClusterWindowPtr> ClusterWindowRefPtr;
00386
00387 OSG_END_NAMESPACE
00388
00389 #define OSGCLUSTERWINDOWBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.40 2005/07/20 00:10:14 vossg Exp $"
00390
00391 #endif