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/SortLast/OSGPipelineComposerBase.h

    r864 r1016  
    8181class OSG_CLUSTER_DLLMAPPING PipelineComposerBase : public ImageComposer 
    8282{ 
     83    /*==========================  PUBLIC  =================================*/ 
    8384  public: 
    84  
     85    /*---------------------------------------------------------------------*/ 
     86    /*! \name Public Types                                                 */ 
     87    /*! \{                                                                 */ 
     88     
    8589    typedef ImageComposer Inherited; 
    8690    typedef ImageComposer ParentContainer; 
     
    8892    typedef Inherited::TypeObject TypeObject; 
    8993    typedef TypeObject::InitPhase InitPhase; 
    90  
    91     OSG_GEN_INTERNALPTR(PipelineComposer); 
    92  
    93     /*==========================  PUBLIC  =================================*/ 
    94  
    95   public: 
     94        
     95    typedef SFBool                 ShortFieldType; 
     96    typedef SFBool                 AlphaFieldType; 
     97    typedef SFUInt32               TileSizeFieldType; 
     98    typedef SFBool                 PipelinedFieldType; 
     99     
     100    typedef PipelineComposer       *       ObjPtr; 
     101    typedef PipelineComposer const *       ObjConstPtr; 
     102    typedef PipelineComposer       * const ObjPtrConst; 
     103    typedef PipelineComposer const * const ObjConstPtrConst; 
     104 
     105    typedef WeakRefCountPtrBuilder<PipelineComposer>::Ptr ObjWeakRefPtr; 
     106    typedef MTRefCountPtrBuilder  <PipelineComposer>::Ptr ObjMTRefPtr; 
     107    typedef RefCountPtrBuilder    <PipelineComposer>::Ptr ObjRefPtr; 
     108    typedef ParentPtrBuilder      <PipelineComposer>::Ptr ObjParentPtr; 
     109     
     110    /*! \}                                                                 */ 
     111    /*---------------------------------------------------------------------*/ 
     112    /*! \name Constants                                                    */ 
     113    /*! \{                                                                 */ 
    96114 
    97115    enum 
     
    114132    static const OSG::BitVector NextFieldMask = 
    115133        (TypeTraits<BitVector>::One << NextFieldId); 
    116  
    117     /*---------------------------------------------------------------------*/ 
    118     /*! \name                    Class Get                                 */ 
     134         
     135    /*! \}                                                                 */ 
     136    /*---------------------------------------------------------------------*/ 
     137    /*! \name Class Get                                                    */ 
    119138    /*! \{                                                                 */ 
    120139 
     
    125144    /*! \}                                                                 */ 
    126145    /*---------------------------------------------------------------------*/ 
    127     /*! \name                FieldContainer Get                            */ 
    128     /*! \{                                                                 */ 
    129  
    130     virtual       FieldContainerType &getType         (void); 
    131     virtual const FieldContainerType &getType         (void) const; 
    132  
    133     virtual       UInt32              getContainerSize(void) const; 
    134  
    135     /*! \}                                                                 */ 
    136     /*---------------------------------------------------------------------*/ 
    137     /*! \name                    Field Get                                 */ 
    138     /*! \{                                                                 */ 
    139  
    140  
    141 #ifdef OSG_1_GET_COMPAT 
    142                   SFBool              *getSFShort           (void); 
    143 #endif 
    144                   SFBool              *editSFShort          (void); 
    145             const SFBool              *getSFShort           (void) const; 
    146  
    147 #ifdef OSG_1_GET_COMPAT 
    148                   SFBool              *getSFAlpha           (void); 
    149 #endif 
    150                   SFBool              *editSFAlpha          (void); 
    151             const SFBool              *getSFAlpha           (void) const; 
    152  
    153 #ifdef OSG_1_GET_COMPAT 
    154                   SFUInt32            *getSFTileSize        (void); 
    155 #endif 
    156                   SFUInt32            *editSFTileSize       (void); 
    157             const SFUInt32            *getSFTileSize        (void) const; 
    158  
    159 #ifdef OSG_1_GET_COMPAT 
    160                   SFBool              *getSFPipelined       (void); 
    161 #endif 
    162                   SFBool              *editSFPipelined      (void); 
    163             const SFBool              *getSFPipelined       (void) const; 
    164  
    165  
    166 #ifdef OSG_1_GET_COMPAT 
    167                   bool                &getShort           (void); 
    168 #endif 
    169                   bool                &editShort          (void); 
    170             const bool                &getShort           (void) const; 
    171  
    172 #ifdef OSG_1_GET_COMPAT 
    173                   bool                &getAlpha           (void); 
    174 #endif 
    175                   bool                &editAlpha          (void); 
    176             const bool                &getAlpha           (void) const; 
    177  
    178 #ifdef OSG_1_GET_COMPAT 
    179                   UInt32              &getTileSize        (void); 
    180 #endif 
    181                   UInt32              &editTileSize       (void); 
    182             const UInt32              &getTileSize        (void) const; 
    183  
    184 #ifdef OSG_1_GET_COMPAT 
    185                   bool                &getPipelined       (void); 
    186 #endif 
    187                   bool                &editPipelined      (void); 
    188             const bool                &getPipelined       (void) const; 
    189  
    190     /*! \}                                                                 */ 
    191     /*---------------------------------------------------------------------*/ 
    192     /*! \name                    Field Set                                 */ 
    193     /*! \{                                                                 */ 
    194  
    195             void setShort          (const bool &value); 
    196             void setAlpha          (const bool &value); 
    197             void setTileSize       (const UInt32 &value); 
    198             void setPipelined      (const bool &value); 
    199  
    200     /*! \}                                                                 */ 
    201     /*---------------------------------------------------------------------*/ 
    202     /*! \name                Ptr MField Set                                */ 
    203     /*! \{                                                                 */ 
    204  
    205     /*! \}                                                                 */ 
    206     /*---------------------------------------------------------------------*/ 
    207     /*! \name                   Binary Access                              */ 
     146    /*! \name FieldContainer Get                                           */ 
     147    /*! \{                                                                 */ 
     148 
     149    virtual FieldContainerType       &getType         (void); 
     150    virtual FieldContainerType const &getType         (void) const; 
     151 
     152    virtual UInt32                    getContainerSize(void) const; 
     153 
     154    /*! \}                                                                 */ 
     155    /*---------------------------------------------------------------------*/ 
     156    /*! \name Field SFShort                                                */ 
     157    /*! \{                                                                 */ 
     158     
     159            SFBool             *editSFShort(void); 
     160            SFBool const       *getSFShort (void) const; 
     161#ifdef OSG_1_GET_COMPAT 
     162            SFBool             *getSFShort (void); 
     163#endif 
     164            SFBool::reference       editShort(void); 
     165            SFBool::const_reference getShort (void) const; 
     166#ifdef OSG_1_GET_COMPAT 
     167            SFBool::reference       getShort (void); 
     168#endif 
     169            void setShort(SFBool::ArgumentType value); 
     170     
     171    /*! \}                                                                 */ 
     172    /*---------------------------------------------------------------------*/ 
     173    /*! \name Field SFAlpha                                                */ 
     174    /*! \{                                                                 */ 
     175     
     176            SFBool             *editSFAlpha(void); 
     177            SFBool const       *getSFAlpha (void) const; 
     178#ifdef OSG_1_GET_COMPAT 
     179            SFBool             *getSFAlpha (void); 
     180#endif 
     181            SFBool::reference       editAlpha(void); 
     182            SFBool::const_reference getAlpha (void) const; 
     183#ifdef OSG_1_GET_COMPAT 
     184            SFBool::reference       getAlpha (void); 
     185#endif 
     186            void setAlpha(SFBool::ArgumentType value); 
     187     
     188    /*! \}                                                                 */ 
     189    /*---------------------------------------------------------------------*/ 
     190    /*! \name Field SFTileSize                                             */ 
     191    /*! \{                                                                 */ 
     192     
     193            SFUInt32             *editSFTileSize(void); 
     194            SFUInt32 const       *getSFTileSize (void) const; 
     195#ifdef OSG_1_GET_COMPAT 
     196            SFUInt32             *getSFTileSize (void); 
     197#endif 
     198            SFUInt32::reference       editTileSize(void); 
     199            SFUInt32::const_reference getTileSize (void) const; 
     200#ifdef OSG_1_GET_COMPAT 
     201            SFUInt32::reference       getTileSize (void); 
     202#endif 
     203            void setTileSize(SFUInt32::ArgumentType value); 
     204     
     205    /*! \}                                                                 */ 
     206    /*---------------------------------------------------------------------*/ 
     207    /*! \name Field SFPipelined                                            */ 
     208    /*! \{                                                                 */ 
     209     
     210            SFBool             *editSFPipelined(void); 
     211            SFBool const       *getSFPipelined (void) const; 
     212#ifdef OSG_1_GET_COMPAT 
     213            SFBool             *getSFPipelined (void); 
     214#endif 
     215            SFBool::reference       editPipelined(void); 
     216            SFBool::const_reference getPipelined (void) const; 
     217#ifdef OSG_1_GET_COMPAT 
     218            SFBool::reference       getPipelined (void); 
     219#endif 
     220            void setPipelined(SFBool::ArgumentType value); 
     221     
     222    /*! \}                                                                 */ 
     223     
     224    /*---------------------------------------------------------------------*/ 
     225    /*! \name Binary Access                                                */ 
    208226    /*! \{                                                                 */ 
    209227 
     
    214232                               ConstFieldMaskArg  whichField); 
    215233 
    216  
    217     /*! \}                                                                 */ 
    218     /*---------------------------------------------------------------------*/ 
    219     /*! \name                   Construction                               */ 
     234    /*! \}                                                                 */ 
     235    /*---------------------------------------------------------------------*/ 
     236    /*! \name Construction                                                 */ 
    220237    /*! \{                                                                 */ 
    221238 
     
    225242    /*! \}                                                                 */ 
    226243    /*---------------------------------------------------------------------*/ 
    227     /*! \name                       Copy                                   */ 
     244    /*! \name Copy                                                         */ 
    228245    /*! \{                                                                 */ 
    229246 
     
    232249    /*! \}                                                                 */ 
    233250    /*=========================  PROTECTED  ===============================*/ 
    234  
    235251  protected: 
    236252 
    237253    static TypeObject _type; 
    238254 
    239     static void   classDescInserter(TypeObject &oType); 
    240     static Char8 *getClassname     (void             ); 
    241  
    242     /*---------------------------------------------------------------------*/ 
    243     /*! \name                      Fields                                  */ 
     255    static void         classDescInserter(TypeObject &oType); 
     256    static Char8 const *getClassname     (void             ); 
     257 
     258    /*---------------------------------------------------------------------*/ 
     259    /*! \name Fields                                                       */ 
    244260    /*! \{                                                                 */ 
    245261 
     
    251267    /*! \}                                                                 */ 
    252268    /*---------------------------------------------------------------------*/ 
    253     /*! \name                   Constructors                               */ 
     269    /*! \name Constructors                                                 */ 
    254270    /*! \{                                                                 */ 
    255271 
    256272    PipelineComposerBase(void); 
    257     PipelineComposerBase(const PipelineComposerBase &source); 
    258  
    259     /*! \}                                                                 */ 
    260     /*---------------------------------------------------------------------*/ 
    261     /*! \name                   Destructors                                */ 
     273    PipelineComposerBase(PipelineComposerBase const &source); 
     274 
     275    /*! \}                                                                 */ 
     276    /*---------------------------------------------------------------------*/ 
     277    /*! \name Destructors                                                  */ 
    262278    /*! \{                                                                 */ 
    263279 
     
    266282    /*! \}                                                                 */ 
    267283    /*---------------------------------------------------------------------*/ 
    268     /*! \name                     onCreate                                */ 
    269     /*! \{                                                                 */ 
    270  
    271  
    272     /*! \}                                                                 */ 
    273     /*---------------------------------------------------------------------*/ 
    274     /*! \name                    Generic Field Access                      */ 
     284    /*! \name onCreate                                                     */ 
     285    /*! \{                                                                 */ 
     286 
     287 
     288    /*! \}                                                                 */ 
     289    /*---------------------------------------------------------------------*/ 
     290    /*! \name Generic Field Access                                         */ 
    275291    /*! \{                                                                 */ 
    276292 
     
    286302    /*! \}                                                                 */ 
    287303    /*---------------------------------------------------------------------*/ 
    288     /*! \name                       Sync                                   */ 
     304    /*! \name Sync                                                         */ 
    289305    /*! \{                                                                 */ 
    290306 
    291307#ifdef OSG_MT_CPTR_ASPECT 
    292     virtual void execSyncV(      FieldContainer    &oFrom, 
    293                                  ConstFieldMaskArg  whichField, 
    294                                  AspectOffsetStore &oOffsets, 
    295                                  ConstFieldMaskArg  syncMode  , 
    296                            const UInt32             uiSyncInfo); 
    297  
    298             void execSync (      PipelineComposerBase *pFrom, 
    299                                  ConstFieldMaskArg  whichField, 
    300                                  AspectOffsetStore &oOffsets, 
    301                                  ConstFieldMaskArg  syncMode  , 
    302                            const UInt32             uiSyncInfo); 
    303 #endif 
    304  
    305     /*! \}                                                                 */ 
    306     /*---------------------------------------------------------------------*/ 
    307     /*! \name                       Edit                                   */ 
    308     /*! \{                                                                 */ 
    309  
    310     /*! \}                                                                 */ 
    311     /*---------------------------------------------------------------------*/ 
    312     /*! \name                     Aspect Create                            */ 
     308    virtual void execSyncV(FieldContainer    &oFrom, 
     309                           ConstFieldMaskArg  whichField, 
     310                           AspectOffsetStore &oOffsets, 
     311                           ConstFieldMaskArg  syncMode, 
     312                           UInt32 const       uiSyncInfo); 
     313 
     314            void execSync (PipelineComposerBase *pFrom, 
     315                           ConstFieldMaskArg  whichField, 
     316                           AspectOffsetStore &oOffsets, 
     317                           ConstFieldMaskArg  syncMode, 
     318                           UInt32 const       uiSyncInfo); 
     319#endif 
     320 
     321    /*! \}                                                                 */ 
     322    /*---------------------------------------------------------------------*/ 
     323    /*! \name Aspect Create                                                */ 
    313324    /*! \{                                                                 */ 
    314325 
     
    316327    virtual FieldContainerPtr createAspectCopy(void) const; 
    317328#endif 
    318  
    319     /*! \}                                                                 */ 
    320     /*---------------------------------------------------------------------*/ 
    321     /*! \name                       Edit                                   */ 
    322     /*! \{                                                                 */ 
    323     /*! \}                                                                 */ 
    324     /*---------------------------------------------------------------------*/ 
    325     /*! \name                       Sync                                   */ 
     329     
     330    /*! \}                                                                 */ 
     331    /*---------------------------------------------------------------------*/ 
     332    /*! \name Sync                                                         */ 
    326333    /*! \{                                                                 */ 
    327334 
     
    330337    /*! \}                                                                 */ 
    331338    /*==========================  PRIVATE  ================================*/ 
    332  
    333339  private: 
    334340 
     
    337343}; 
    338344 
    339 typedef PipelineComposerBase *PipelineComposerBaseP
    340  
    341 /** Type specific RefPtr type for PipelineComposer. */ 
    342 typedef RefPtr<PipelineComposerPtr> PipelineComposerRefPtr; 
     345typedef PipelineComposerBase::ObjRefPtr         PipelineComposerRefPtr
     346typedef PipelineComposerBase::ObjMTRefPtr       PipelineComposerMTRefPtr; 
     347typedef PipelineComposerBase::ObjWeakRefPtr     PipelineComposerWeakRefPtr; 
     348typedef PipelineComposerBase::ObjParentPtr      PipelineComposerParentPtr; 
    343349 
    344350typedef boost::mpl::if_<