Show
Ignore:
Timestamp:
11/14/07 17:11:26 (1 year ago)
Author:
cneumann
Message:

changed: started to use new pointer fields
added: ReferenceCountPointer? template
removed: EditHandle? for parent pointer fields

NOTE: Does not compile yet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/Cluster/Window/MultiDisplay/OSGMultiDisplayWindowBase.h

    r864 r1016  
    8282class OSG_CLUSTER_DLLMAPPING MultiDisplayWindowBase : public ClusterWindow 
    8383{ 
     84    /*==========================  PUBLIC  =================================*/ 
    8485  public: 
    85  
     86    /*---------------------------------------------------------------------*/ 
     87    /*! \name Public Types                                                 */ 
     88    /*! \{                                                                 */ 
     89     
    8690    typedef ClusterWindow Inherited; 
    8791    typedef ClusterWindow ParentContainer; 
     
    8993    typedef Inherited::TypeObject TypeObject; 
    9094    typedef TypeObject::InitPhase InitPhase; 
    91  
    92     OSG_GEN_INTERNALPTR(MultiDisplayWindow); 
    93  
    94     /*==========================  PUBLIC  =================================*/ 
    95  
    96   public: 
     95        
     96    typedef SFUInt32               HServersFieldType; 
     97    typedef SFUInt32               VServersFieldType; 
     98    typedef SFBool                 ManageClientViewportsFieldType; 
     99    typedef SFInt32                XOverlapFieldType; 
     100    typedef SFInt32                YOverlapFieldType; 
     101     
     102    typedef MultiDisplayWindow       *       ObjPtr; 
     103    typedef MultiDisplayWindow const *       ObjConstPtr; 
     104    typedef MultiDisplayWindow       * const ObjPtrConst; 
     105    typedef MultiDisplayWindow const * const ObjConstPtrConst; 
     106 
     107    typedef WeakRefCountPtrBuilder<MultiDisplayWindow>::Ptr ObjWeakRefPtr; 
     108    typedef MTRefCountPtrBuilder  <MultiDisplayWindow>::Ptr ObjMTRefPtr; 
     109    typedef RefCountPtrBuilder    <MultiDisplayWindow>::Ptr ObjRefPtr; 
     110    typedef ParentPtrBuilder      <MultiDisplayWindow>::Ptr ObjParentPtr; 
     111     
     112    /*! \}                                                                 */ 
     113    /*---------------------------------------------------------------------*/ 
     114    /*! \name Constants                                                    */ 
     115    /*! \{                                                                 */ 
    97116 
    98117    enum 
     
    118137    static const OSG::BitVector NextFieldMask = 
    119138        (TypeTraits<BitVector>::One << NextFieldId); 
    120  
    121     /*---------------------------------------------------------------------*/ 
    122     /*! \name                    Class Get                                 */ 
     139         
     140    /*! \}                                                                 */ 
     141    /*---------------------------------------------------------------------*/ 
     142    /*! \name Class Get                                                    */ 
    123143    /*! \{                                                                 */ 
    124144 
     
    129149    /*! \}                                                                 */ 
    130150    /*---------------------------------------------------------------------*/ 
    131     /*! \name                FieldContainer Get                            */ 
    132     /*! \{                                                                 */ 
    133  
    134     virtual       FieldContainerType &getType         (void); 
    135     virtual const FieldContainerType &getType         (void) const; 
    136  
    137     virtual       UInt32              getContainerSize(void) const; 
    138  
    139     /*! \}                                                                 */ 
    140     /*---------------------------------------------------------------------*/ 
    141     /*! \name                    Field Get                                 */ 
    142     /*! \{                                                                 */ 
    143  
    144  
    145 #ifdef OSG_1_GET_COMPAT 
    146                   SFUInt32            *getSFHServers        (void); 
    147 #endif 
    148                   SFUInt32            *editSFHServers       (void); 
    149             const SFUInt32            *getSFHServers        (void) const; 
    150  
    151 #ifdef OSG_1_GET_COMPAT 
    152                   SFUInt32            *getSFVServers        (void); 
    153 #endif 
    154                   SFUInt32            *editSFVServers       (void); 
    155             const SFUInt32            *getSFVServers        (void) const; 
    156  
    157 #ifdef OSG_1_GET_COMPAT 
    158                   SFBool              *getSFManageClientViewports (void); 
    159 #endif 
    160                   SFBool              *editSFManageClientViewports(void); 
    161             const SFBool              *getSFManageClientViewports (void) const; 
    162  
    163 #ifdef OSG_1_GET_COMPAT 
    164                   SFInt32             *getSFXOverlap        (void); 
    165 #endif 
    166                   SFInt32             *editSFXOverlap       (void); 
    167             const SFInt32             *getSFXOverlap        (void) const; 
    168  
    169 #ifdef OSG_1_GET_COMPAT 
    170                   SFInt32             *getSFYOverlap        (void); 
    171 #endif 
    172                   SFInt32             *editSFYOverlap       (void); 
    173             const SFInt32             *getSFYOverlap        (void) const; 
    174  
    175  
    176 #ifdef OSG_1_GET_COMPAT 
    177                   UInt32              &getHServers        (void); 
    178 #endif 
    179                   UInt32              &editHServers       (void); 
    180             const UInt32              &getHServers        (void) const; 
    181  
    182 #ifdef OSG_1_GET_COMPAT 
    183                   UInt32              &getVServers        (void); 
    184 #endif 
    185                   UInt32              &editVServers       (void); 
    186             const UInt32              &getVServers        (void) const; 
    187  
    188 #ifdef OSG_1_GET_COMPAT 
    189                   bool                &getManageClientViewports (void); 
    190 #endif 
    191                   bool                &editManageClientViewports(void); 
    192             const bool                &getManageClientViewports (void) const; 
    193  
    194 #ifdef OSG_1_GET_COMPAT 
    195                   Int32               &getXOverlap        (void); 
    196 #endif 
    197                   Int32               &editXOverlap       (void); 
    198             const Int32               &getXOverlap        (void) const; 
    199  
    200 #ifdef OSG_1_GET_COMPAT 
    201                   Int32               &getYOverlap        (void); 
    202 #endif 
    203                   Int32               &editYOverlap       (void); 
    204             const Int32               &getYOverlap        (void) const; 
    205  
    206     /*! \}                                                                 */ 
    207     /*---------------------------------------------------------------------*/ 
    208     /*! \name                    Field Set                                 */ 
    209     /*! \{                                                                 */ 
    210  
    211             void setHServers       (const UInt32 &value); 
    212             void setVServers       (const UInt32 &value); 
    213             void setManageClientViewports(const bool &value); 
    214             void setXOverlap       (const Int32 &value); 
    215             void setYOverlap       (const Int32 &value); 
    216  
    217     /*! \}                                                                 */ 
    218     /*---------------------------------------------------------------------*/ 
    219     /*! \name                Ptr MField Set                                */ 
    220     /*! \{                                                                 */ 
    221  
    222     /*! \}                                                                 */ 
    223     /*---------------------------------------------------------------------*/ 
    224     /*! \name                   Binary Access                              */ 
     151    /*! \name FieldContainer Get                                           */ 
     152    /*! \{                                                                 */ 
     153 
     154    virtual FieldContainerType       &getType         (void); 
     155    virtual FieldContainerType const &getType         (void) const; 
     156 
     157    virtual UInt32                    getContainerSize(void) const; 
     158 
     159    /*! \}                                                                 */ 
     160    /*---------------------------------------------------------------------*/ 
     161    /*! \name Field SFHServers                                             */ 
     162    /*! \{                                                                 */ 
     163     
     164            SFUInt32             *editSFHServers(void); 
     165            SFUInt32 const       *getSFHServers (void) const; 
     166#ifdef OSG_1_GET_COMPAT 
     167            SFUInt32             *getSFHServers (void); 
     168#endif 
     169            SFUInt32::reference       editHServers(void); 
     170            SFUInt32::const_reference getHServers (void) const; 
     171#ifdef OSG_1_GET_COMPAT 
     172            SFUInt32::reference       getHServers (void); 
     173#endif 
     174            void setHServers(SFUInt32::ArgumentType value); 
     175     
     176    /*! \}                                                                 */ 
     177    /*---------------------------------------------------------------------*/ 
     178    /*! \name Field SFVServers                                             */ 
     179    /*! \{                                                                 */ 
     180     
     181            SFUInt32             *editSFVServers(void); 
     182            SFUInt32 const       *getSFVServers (void) const; 
     183#ifdef OSG_1_GET_COMPAT 
     184            SFUInt32             *getSFVServers (void); 
     185#endif 
     186            SFUInt32::reference       editVServers(void); 
     187            SFUInt32::const_reference getVServers (void) const; 
     188#ifdef OSG_1_GET_COMPAT 
     189            SFUInt32::reference       getVServers (void); 
     190#endif 
     191            void setVServers(SFUInt32::ArgumentType value); 
     192     
     193    /*! \}                                                                 */ 
     194    /*---------------------------------------------------------------------*/ 
     195    /*! \name Field SFManageClientViewports                                */ 
     196    /*! \{                                                                 */ 
     197     
     198            SFBool             *editSFManageClientViewports(void); 
     199            SFBool const       *getSFManageClientViewports (void) const; 
     200#ifdef OSG_1_GET_COMPAT 
     201            SFBool             *getSFManageClientViewports (void); 
     202#endif 
     203            SFBool::reference       editManageClientViewports(void); 
     204            SFBool::const_reference getManageClientViewports (void) const; 
     205#ifdef OSG_1_GET_COMPAT 
     206            SFBool::reference       getManageClientViewports (void); 
     207#endif 
     208            void setManageClientViewports(SFBool::ArgumentType value); 
     209     
     210    /*! \}                                                                 */ 
     211    /*---------------------------------------------------------------------*/ 
     212    /*! \name Field SFXOverlap                                             */ 
     213    /*! \{                                                                 */ 
     214     
     215            SFInt32             *editSFXOverlap(void); 
     216            SFInt32 const       *getSFXOverlap (void) const; 
     217#ifdef OSG_1_GET_COMPAT 
     218            SFInt32             *getSFXOverlap (void); 
     219#endif 
     220            SFInt32::reference       editXOverlap(void); 
     221            SFInt32::const_reference getXOverlap (void) const; 
     222#ifdef OSG_1_GET_COMPAT 
     223            SFInt32::reference       getXOverlap (void); 
     224#endif 
     225            void setXOverlap(SFInt32::ArgumentType value); 
     226     
     227    /*! \}                                                                 */ 
     228    /*---------------------------------------------------------------------*/ 
     229    /*! \name Field SFYOverlap                                             */ 
     230    /*! \{                                                                 */ 
     231     
     232            SFInt32             *editSFYOverlap(void); 
     233            SFInt32 const       *getSFYOverlap (void) const; 
     234#ifdef OSG_1_GET_COMPAT 
     235            SFInt32             *getSFYOverlap (void); 
     236#endif 
     237            SFInt32::reference       editYOverlap(void); 
     238            SFInt32::const_reference getYOverlap (void) const; 
     239#ifdef OSG_1_GET_COMPAT 
     240            SFInt32::reference       getYOverlap (void); 
     241#endif 
     242            void setYOverlap(SFInt32::ArgumentType value); 
     243     
     244    /*! \}                                                                 */ 
     245     
     246    /*---------------------------------------------------------------------*/ 
     247    /*! \name Binary Access                                                */ 
    225248    /*! \{                                                                 */ 
    226249 
     
    231254                               ConstFieldMaskArg  whichField); 
    232255 
    233  
    234     /*! \}                                                                 */ 
    235     /*---------------------------------------------------------------------*/ 
    236     /*! \name                   Construction                               */ 
     256    /*! \}                                                                 */ 
     257    /*---------------------------------------------------------------------*/ 
     258    /*! \name Construction                                                 */ 
    237259    /*! \{                                                                 */ 
    238260 
     
    242264    /*! \}                                                                 */ 
    243265    /*---------------------------------------------------------------------*/ 
    244     /*! \name                       Copy                                   */ 
     266    /*! \name Copy                                                         */ 
    245267    /*! \{                                                                 */ 
    246268 
     
    249271    /*! \}                                                                 */ 
    250272    /*=========================  PROTECTED  ===============================*/ 
    251  
    252273  protected: 
    253274 
    254275    static TypeObject _type; 
    255276 
    256     static void   classDescInserter(TypeObject &oType); 
    257     static Char8 *getClassname     (void             ); 
    258  
    259     /*---------------------------------------------------------------------*/ 
    260     /*! \name                      Fields                                  */ 
     277    static void         classDescInserter(TypeObject &oType); 
     278    static Char8 const *getClassname     (void             ); 
     279 
     280    /*---------------------------------------------------------------------*/ 
     281    /*! \name Fields                                                       */ 
    261282    /*! \{                                                                 */ 
    262283 
     
    269290    /*! \}                                                                 */ 
    270291    /*---------------------------------------------------------------------*/ 
    271     /*! \name                   Constructors                               */ 
     292    /*! \name Constructors                                                 */ 
    272293    /*! \{                                                                 */ 
    273294 
    274295    MultiDisplayWindowBase(void); 
    275     MultiDisplayWindowBase(const MultiDisplayWindowBase &source); 
    276  
    277     /*! \}                                                                 */ 
    278     /*---------------------------------------------------------------------*/ 
    279     /*! \name                   Destructors                                */ 
     296    MultiDisplayWindowBase(MultiDisplayWindowBase const &source); 
     297 
     298    /*! \}                                                                 */ 
     299    /*---------------------------------------------------------------------*/ 
     300    /*! \name Destructors                                                  */ 
    280301    /*! \{                                                                 */ 
    281302 
     
    284305    /*! \}                                                                 */ 
    285306    /*---------------------------------------------------------------------*/ 
    286     /*! \name                     onCreate                                */ 
    287     /*! \{                                                                 */ 
    288  
    289  
    290     /*! \}                                                                 */ 
    291     /*---------------------------------------------------------------------*/ 
    292     /*! \name                    Generic Field Access                      */ 
     307    /*! \name onCreate                                                     */ 
     308    /*! \{                                                                 */ 
     309 
     310 
     311    /*! \}                                                                 */ 
     312    /*---------------------------------------------------------------------*/ 
     313    /*! \name Generic Field Access                                         */ 
    293314    /*! \{                                                                 */ 
    294315 
     
    306327    /*! \}                                                                 */ 
    307328    /*---------------------------------------------------------------------*/ 
    308     /*! \name                       Sync                                   */ 
     329    /*! \name Sync                                                         */ 
    309330    /*! \{                                                                 */ 
    310331 
    311332#ifdef OSG_MT_CPTR_ASPECT 
    312     virtual void execSyncV(      FieldContainer    &oFrom, 
    313                                  ConstFieldMaskArg  whichField, 
    314                                  AspectOffsetStore &oOffsets, 
    315                                  ConstFieldMaskArg  syncMode  , 
    316                            const UInt32             uiSyncInfo); 
    317  
    318             void execSync (      MultiDisplayWindowBase *pFrom, 
    319                                  ConstFieldMaskArg  whichField, 
    320                                  AspectOffsetStore &oOffsets, 
    321                                  ConstFieldMaskArg  syncMode  , 
    322                            const UInt32             uiSyncInfo); 
    323 #endif 
    324  
    325     /*! \}                                                                 */ 
    326     /*---------------------------------------------------------------------*/ 
    327     /*! \name                       Edit                                   */ 
    328     /*! \{                                                                 */ 
    329  
    330     /*! \}                                                                 */ 
    331     /*---------------------------------------------------------------------*/ 
    332     /*! \name                     Aspect Create                            */ 
     333    virtual void execSyncV(FieldContainer    &oFrom, 
     334                           ConstFieldMaskArg  whichField, 
     335                           AspectOffsetStore &oOffsets, 
     336                           ConstFieldMaskArg  syncMode, 
     337                           UInt32 const       uiSyncInfo); 
     338 
     339            void execSync (MultiDisplayWindowBase *pFrom, 
     340                           ConstFieldMaskArg  whichField, 
     341                           AspectOffsetStore &oOffsets, 
     342                           ConstFieldMaskArg  syncMode, 
     343                           UInt32 const       uiSyncInfo); 
     344#endif 
     345 
     346    /*! \}                                                                 */ 
     347    /*---------------------------------------------------------------------*/ 
     348    /*! \name Aspect Create                                                */ 
    333349    /*! \{                                                                 */ 
    334350 
     
    336352    virtual FieldContainerPtr createAspectCopy(void) const; 
    337353#endif 
    338  
    339     /*! \}                                                                 */ 
    340     /*---------------------------------------------------------------------*/ 
    341     /*! \name                       Edit                                   */ 
    342     /*! \{                                                                 */ 
    343     /*! \}                                                                 */ 
    344     /*---------------------------------------------------------------------*/ 
    345     /*! \name                       Sync                                   */ 
     354     
     355    /*! \}                                                                 */ 
     356    /*---------------------------------------------------------------------*/ 
     357    /*! \name Sync                                                         */ 
    346358    /*! \{                                                                 */ 
    347359 
     
    350362    /*! \}                                                                 */ 
    351363    /*==========================  PRIVATE  ================================*/ 
    352  
    353364  private: 
    354365 
     
    357368}; 
    358369 
    359 typedef MultiDisplayWindowBase *MultiDisplayWindowBaseP
    360  
    361 /** Type specific RefPtr type for MultiDisplayWindow. */ 
    362 typedef RefPtr<MultiDisplayWindowPtr> MultiDisplayWindowRefPtr; 
     370typedef MultiDisplayWindowBase::ObjRefPtr         MultiDisplayWindowRefPtr
     371typedef MultiDisplayWindowBase::ObjMTRefPtr       MultiDisplayWindowMTRefPtr; 
     372typedef MultiDisplayWindowBase::ObjWeakRefPtr     MultiDisplayWindowWeakRefPtr; 
     373typedef MultiDisplayWindowBase::ObjParentPtr      MultiDisplayWindowParentPtr; 
    363374 
    364375typedef boost::mpl::if_<