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/OSGParallelComposerBase.h

    r864 r1016  
    8080class OSG_CLUSTER_DLLMAPPING ParallelComposerBase : public ImageComposer 
    8181{ 
     82    /*==========================  PUBLIC  =================================*/ 
    8283  public: 
    83  
     84    /*---------------------------------------------------------------------*/ 
     85    /*! \name Public Types                                                 */ 
     86    /*! \{                                                                 */ 
     87     
    8488    typedef ImageComposer Inherited; 
    8589    typedef ImageComposer ParentContainer; 
     
    8791    typedef Inherited::TypeObject TypeObject; 
    8892    typedef TypeObject::InitPhase InitPhase; 
    89  
    90     OSG_GEN_INTERNALPTR(ParallelComposer); 
    91  
    92     /*==========================  PUBLIC  =================================*/ 
    93  
    94   public: 
     93        
     94    typedef SFBool                 ShortFieldType; 
     95    typedef SFBool                 AlphaFieldType; 
     96    typedef SFString               PcLibPathFieldType; 
     97     
     98    typedef ParallelComposer       *       ObjPtr; 
     99    typedef ParallelComposer const *       ObjConstPtr; 
     100    typedef ParallelComposer       * const ObjPtrConst; 
     101    typedef ParallelComposer const * const ObjConstPtrConst; 
     102 
     103    typedef WeakRefCountPtrBuilder<ParallelComposer>::Ptr ObjWeakRefPtr; 
     104    typedef MTRefCountPtrBuilder  <ParallelComposer>::Ptr ObjMTRefPtr; 
     105    typedef RefCountPtrBuilder    <ParallelComposer>::Ptr ObjRefPtr; 
     106    typedef ParentPtrBuilder      <ParallelComposer>::Ptr ObjParentPtr; 
     107     
     108    /*! \}                                                                 */ 
     109    /*---------------------------------------------------------------------*/ 
     110    /*! \name Constants                                                    */ 
     111    /*! \{                                                                 */ 
    95112 
    96113    enum 
     
    110127    static const OSG::BitVector NextFieldMask = 
    111128        (TypeTraits<BitVector>::One << NextFieldId); 
    112  
    113     /*---------------------------------------------------------------------*/ 
    114     /*! \name                    Class Get                                 */ 
     129         
     130    /*! \}                                                                 */ 
     131    /*---------------------------------------------------------------------*/ 
     132    /*! \name Class Get                                                    */ 
    115133    /*! \{                                                                 */ 
    116134 
     
    121139    /*! \}                                                                 */ 
    122140    /*---------------------------------------------------------------------*/ 
    123     /*! \name                FieldContainer Get                            */ 
    124     /*! \{                                                                 */ 
    125  
    126     virtual       FieldContainerType &getType         (void); 
    127     virtual const FieldContainerType &getType         (void) const; 
    128  
    129     virtual       UInt32              getContainerSize(void) const; 
    130  
    131     /*! \}                                                                 */ 
    132     /*---------------------------------------------------------------------*/ 
    133     /*! \name                    Field Get                                 */ 
    134     /*! \{                                                                 */ 
    135  
    136  
    137 #ifdef OSG_1_GET_COMPAT 
    138                   SFBool              *getSFShort           (void); 
    139 #endif 
    140                   SFBool              *editSFShort          (void); 
    141             const SFBool              *getSFShort           (void) const; 
    142  
    143 #ifdef OSG_1_GET_COMPAT 
    144                   SFBool              *getSFAlpha           (void); 
    145 #endif 
    146                   SFBool              *editSFAlpha          (void); 
    147             const SFBool              *getSFAlpha           (void) const; 
    148  
    149 #ifdef OSG_1_GET_COMPAT 
    150                   SFString            *getSFPcLibPath       (void); 
    151 #endif 
    152                   SFString            *editSFPcLibPath      (void); 
    153             const SFString            *getSFPcLibPath       (void) const; 
    154  
    155  
    156 #ifdef OSG_1_GET_COMPAT 
    157                   bool                &getShort           (void); 
    158 #endif 
    159                   bool                &editShort          (void); 
    160             const bool                &getShort           (void) const; 
    161  
    162 #ifdef OSG_1_GET_COMPAT 
    163                   bool                &getAlpha           (void); 
    164 #endif 
    165                   bool                &editAlpha          (void); 
    166             const bool                &getAlpha           (void) const; 
    167  
    168 #ifdef OSG_1_GET_COMPAT 
    169                   std::string         &getPcLibPath       (void); 
    170 #endif 
    171                   std::string         &editPcLibPath      (void); 
    172             const std::string         &getPcLibPath       (void) const; 
    173  
    174     /*! \}                                                                 */ 
    175     /*---------------------------------------------------------------------*/ 
    176     /*! \name                    Field Set                                 */ 
    177     /*! \{                                                                 */ 
    178  
    179             void setShort          (const bool &value); 
    180             void setAlpha          (const bool &value); 
    181             void setPcLibPath      (const std::string &value); 
    182  
    183     /*! \}                                                                 */ 
    184     /*---------------------------------------------------------------------*/ 
    185     /*! \name                Ptr MField Set                                */ 
    186     /*! \{                                                                 */ 
    187  
    188     /*! \}                                                                 */ 
    189     /*---------------------------------------------------------------------*/ 
    190     /*! \name                   Binary Access                              */ 
     141    /*! \name FieldContainer Get                                           */ 
     142    /*! \{                                                                 */ 
     143 
     144    virtual FieldContainerType       &getType         (void); 
     145    virtual FieldContainerType const &getType         (void) const; 
     146 
     147    virtual UInt32                    getContainerSize(void) const; 
     148 
     149    /*! \}                                                                 */ 
     150    /*---------------------------------------------------------------------*/ 
     151    /*! \name Field SFShort                                                */ 
     152    /*! \{                                                                 */ 
     153     
     154            SFBool             *editSFShort(void); 
     155            SFBool const       *getSFShort (void) const; 
     156#ifdef OSG_1_GET_COMPAT 
     157            SFBool             *getSFShort (void); 
     158#endif 
     159            SFBool::reference       editShort(void); 
     160            SFBool::const_reference getShort (void) const; 
     161#ifdef OSG_1_GET_COMPAT 
     162            SFBool::reference       getShort (void); 
     163#endif 
     164            void setShort(SFBool::ArgumentType value); 
     165     
     166    /*! \}                                                                 */ 
     167    /*---------------------------------------------------------------------*/ 
     168    /*! \name Field SFAlpha                                                */ 
     169    /*! \{                                                                 */ 
     170     
     171            SFBool             *editSFAlpha(void); 
     172            SFBool const       *getSFAlpha (void) const; 
     173#ifdef OSG_1_GET_COMPAT 
     174            SFBool             *getSFAlpha (void); 
     175#endif 
     176            SFBool::reference       editAlpha(void); 
     177            SFBool::const_reference getAlpha (void) const; 
     178#ifdef OSG_1_GET_COMPAT 
     179            SFBool::reference       getAlpha (void); 
     180#endif 
     181            void setAlpha(SFBool::ArgumentType value); 
     182     
     183    /*! \}                                                                 */ 
     184    /*---------------------------------------------------------------------*/ 
     185    /*! \name Field SFPcLibPath                                            */ 
     186    /*! \{                                                                 */ 
     187     
     188            SFString             *editSFPcLibPath(void); 
     189            SFString const       *getSFPcLibPath (void) const; 
     190#ifdef OSG_1_GET_COMPAT 
     191            SFString             *getSFPcLibPath (void); 
     192#endif 
     193            SFString::reference       editPcLibPath(void); 
     194            SFString::const_reference getPcLibPath (void) const; 
     195#ifdef OSG_1_GET_COMPAT 
     196            SFString::reference       getPcLibPath (void); 
     197#endif 
     198            void setPcLibPath(SFString::ArgumentType value); 
     199     
     200    /*! \}                                                                 */ 
     201     
     202    /*---------------------------------------------------------------------*/ 
     203    /*! \name Binary Access                                                */ 
    191204    /*! \{                                                                 */ 
    192205 
     
    197210                               ConstFieldMaskArg  whichField); 
    198211 
    199  
    200     /*! \}                                                                 */ 
    201     /*---------------------------------------------------------------------*/ 
    202     /*! \name                   Construction                               */ 
     212    /*! \}                                                                 */ 
     213    /*---------------------------------------------------------------------*/ 
     214    /*! \name Construction                                                 */ 
    203215    /*! \{                                                                 */ 
    204216 
     
    208220    /*! \}                                                                 */ 
    209221    /*---------------------------------------------------------------------*/ 
    210     /*! \name                       Copy                                   */ 
     222    /*! \name Copy                                                         */ 
    211223    /*! \{                                                                 */ 
    212224 
     
    215227    /*! \}                                                                 */ 
    216228    /*=========================  PROTECTED  ===============================*/ 
    217  
    218229  protected: 
    219230 
    220231    static TypeObject _type; 
    221232 
    222     static void   classDescInserter(TypeObject &oType); 
    223     static Char8 *getClassname     (void             ); 
    224  
    225     /*---------------------------------------------------------------------*/ 
    226     /*! \name                      Fields                                  */ 
     233    static void         classDescInserter(TypeObject &oType); 
     234    static Char8 const *getClassname     (void             ); 
     235 
     236    /*---------------------------------------------------------------------*/ 
     237    /*! \name Fields                                                       */ 
    227238    /*! \{                                                                 */ 
    228239 
     
    233244    /*! \}                                                                 */ 
    234245    /*---------------------------------------------------------------------*/ 
    235     /*! \name                   Constructors                               */ 
     246    /*! \name Constructors                                                 */ 
    236247    /*! \{                                                                 */ 
    237248 
    238249    ParallelComposerBase(void); 
    239     ParallelComposerBase(const ParallelComposerBase &source); 
    240  
    241     /*! \}                                                                 */ 
    242     /*---------------------------------------------------------------------*/ 
    243     /*! \name                   Destructors                                */ 
     250    ParallelComposerBase(ParallelComposerBase const &source); 
     251 
     252    /*! \}                                                                 */ 
     253    /*---------------------------------------------------------------------*/ 
     254    /*! \name Destructors                                                  */ 
    244255    /*! \{                                                                 */ 
    245256 
     
    248259    /*! \}                                                                 */ 
    249260    /*---------------------------------------------------------------------*/ 
    250     /*! \name                     onCreate                                */ 
    251     /*! \{                                                                 */ 
    252  
    253  
    254     /*! \}                                                                 */ 
    255     /*---------------------------------------------------------------------*/ 
    256     /*! \name                    Generic Field Access                      */ 
     261    /*! \name onCreate                                                     */ 
     262    /*! \{                                                                 */ 
     263 
     264 
     265    /*! \}                                                                 */ 
     266    /*---------------------------------------------------------------------*/ 
     267    /*! \name Generic Field Access                                         */ 
    257268    /*! \{                                                                 */ 
    258269 
     
    266277    /*! \}                                                                 */ 
    267278    /*---------------------------------------------------------------------*/ 
    268     /*! \name                       Sync                                   */ 
     279    /*! \name Sync                                                         */ 
    269280    /*! \{                                                                 */ 
    270281 
    271282#ifdef OSG_MT_CPTR_ASPECT 
    272     virtual void execSyncV(      FieldContainer    &oFrom, 
    273                                  ConstFieldMaskArg  whichField, 
    274                                  AspectOffsetStore &oOffsets, 
    275                                  ConstFieldMaskArg  syncMode  , 
    276                            const UInt32             uiSyncInfo); 
    277  
    278             void execSync (      ParallelComposerBase *pFrom, 
    279                                  ConstFieldMaskArg  whichField, 
    280                                  AspectOffsetStore &oOffsets, 
    281                                  ConstFieldMaskArg  syncMode  , 
    282                            const UInt32             uiSyncInfo); 
    283 #endif 
    284  
    285     /*! \}                                                                 */ 
    286     /*---------------------------------------------------------------------*/ 
    287     /*! \name                       Edit                                   */ 
    288     /*! \{                                                                 */ 
    289  
    290     /*! \}                                                                 */ 
    291     /*---------------------------------------------------------------------*/ 
    292     /*! \name                     Aspect Create                            */ 
     283    virtual void execSyncV(FieldContainer    &oFrom, 
     284                           ConstFieldMaskArg  whichField, 
     285                           AspectOffsetStore &oOffsets, 
     286                           ConstFieldMaskArg  syncMode, 
     287                           UInt32 const       uiSyncInfo); 
     288 
     289            void execSync (ParallelComposerBase *pFrom, 
     290                           ConstFieldMaskArg  whichField, 
     291                           AspectOffsetStore &oOffsets, 
     292                           ConstFieldMaskArg  syncMode, 
     293                           UInt32 const       uiSyncInfo); 
     294#endif 
     295 
     296    /*! \}                                                                 */ 
     297    /*---------------------------------------------------------------------*/ 
     298    /*! \name Aspect Create                                                */ 
    293299    /*! \{                                                                 */ 
    294300 
     
    296302    virtual FieldContainerPtr createAspectCopy(void) const; 
    297303#endif 
    298  
    299     /*! \}                                                                 */ 
    300     /*---------------------------------------------------------------------*/ 
    301     /*! \name                       Edit                                   */ 
    302     /*! \{                                                                 */ 
    303     /*! \}                                                                 */ 
    304     /*---------------------------------------------------------------------*/ 
    305     /*! \name                       Sync                                   */ 
     304     
     305    /*! \}                                                                 */ 
     306    /*---------------------------------------------------------------------*/ 
     307    /*! \name Sync                                                         */ 
    306308    /*! \{                                                                 */ 
    307309 
     
    310312    /*! \}                                                                 */ 
    311313    /*==========================  PRIVATE  ================================*/ 
    312  
    313314  private: 
    314315 
     
    317318}; 
    318319 
    319 typedef ParallelComposerBase *ParallelComposerBaseP
    320  
    321 /** Type specific RefPtr type for ParallelComposer. */ 
    322 typedef RefPtr<ParallelComposerPtr> ParallelComposerRefPtr; 
     320typedef ParallelComposerBase::ObjRefPtr         ParallelComposerRefPtr
     321typedef ParallelComposerBase::ObjMTRefPtr       ParallelComposerMTRefPtr; 
     322typedef ParallelComposerBase::ObjWeakRefPtr     ParallelComposerWeakRefPtr; 
     323typedef ParallelComposerBase::ObjParentPtr      ParallelComposerParentPtr; 
    323324 
    324325typedef boost::mpl::if_<