Show
Ignore:
Timestamp:
10/20/07 18:11:52 (11 months ago)
Author:
cneumann
Message:

added: RootObjectT template paremter for ReferenceCountPointer?

and ParentPointer? templates - allows use for FieldBundles?

compile fixes - but still not done

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGRotateManipulatorFields.h

    r969 r976  
    5858#include "OSGContribGUIDef.h" 
    5959 
    60 #include "OSGParentContainer.h" 
    61 #include "OSGInternalRefPtr.h" 
     60#include "OSGReferenceCountPointer.h" 
     61#include "OSGParentPointer.h" 
    6262 
    6363#include "OSGManipulatorFields.h" 
    6464 
    65 #include "OSGSFieldAdaptor.h" 
    66 #include "OSGMFieldAdaptor.h" 
    67  
     65#include "OSGSPointerFieldAdapter.h" 
     66#include "OSGMPointerFieldAdapter.h" 
    6867 
    6968OSG_BEGIN_NAMESPACE 
     69 
     70#if !defined(OSG_DO_DOC) // created as a dummy class, remove to prevent doubles 
     71//! RotateManipulatorPtr 
    7072 
    7173class RotateManipulator; 
     
    7375OSG_GEN_CONTAINERPTR(RotateManipulator); 
    7476 
    75 typedef RefPtr<RotateManipulator>         RotateManipulatorRefPtr; 
    76 typedef MTRefPtr<RotateManipulator>       RotateManipulatorMTRefPtr; 
     77typedef RefCountPtrBuilder<RotateManipulator>::Ptr         RotateManipulatorRefPtr; 
     78typedef MTRefCountPtrBuilder<RotateManipulator>::Ptr       RotateManipulatorMTRefPtr; 
     79typedef WeakRefCountPtrBuilder<RotateManipulator>::Ptr     RotateManipulatorWeakRefPtr; 
     80typedef InternalRefCountPtrBuilder<RotateManipulator>::Ptr RotateManipulatorInternalRefPtr; 
    7781 
    78 typedef InternalRefPtr<RotateManipulator>       RotateManipulatorInternalRefPtr; 
    79 typedef InternalRefPtr<RotateManipulator> const RotateManipulatorInternalRefPtrConst; 
    80 typedef InternalRefPtr<RotateManipulator> const RotateManipulatorInternalRefPtrConstArg; 
    81  
    82 typedef PtrWrapper<RotateManipulator, 
    83                    RotateManipulatorPtr>        ParentRotateManipulatorPtr; 
    84 typedef PtrWrapper<RotateManipulator, 
    85                    RotateManipulatorPtr> const  ParentRotateManipulatorPtrConst; 
    86  
    87 #if !defined(OSG_DO_DOC) // created as a dummy class, remove to prevent doubles 
    88 //! RotateManipulatorPtr 
    89  
    90 OSG_GEN_CONTAINERPTR(RotateManipulator); 
     82typedef ParentPtrBuilder<RotateManipulator>::Ptr           RotateManipulatorParentPtr; 
    9183 
    9284#endif 
     
    10092 
    10193template <> 
    102 struct FieldTraits<RotateManipulatorPtr> : 
    103     public FieldTraitsFCPtrBase<RotateManipulatorPtr> 
     94struct FieldTraits<RotateManipulatorInternalRefPtr> : 
     95    public FieldTraitsFCReferenceCountPointerBase<RotateManipulatorInternalRefPtr> 
    10496{ 
    10597  private: 
    10698 
    107     static DataType             _type; 
     99    static DataType _type; 
    108100 
    109101  public: 
    110102 
    111     typedef FieldTraits<RotateManipulatorPtr>  Self; 
     103    typedef FieldTraits<RotateManipulatorInternalRefPtr>  Self; 
    112104 
    113     enum                        { Convertible = NotConvertible }; 
     105    enum { Convertible = NotConvertible }; 
    114106}; 
    115107 
    116 #if !defined(OSG_DOC_DEV_TRAITS) 
    117 /*! \class  FieldTraitsTemplateBase<RotateManipulatorPtr, 0> 
    118     \hideinhierarchy 
    119  */ 
    120 #endif 
    121  
    122 #endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
    123  
    124 #if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
    125108/*! \ingroup GrpContribGUIFieldTraits 
    126109 */ 
     
    130113 
    131114template <> 
    132 struct FieldTraits<RotateManipulatorInternalRefPtr> : 
    133     public FieldTraitsFCPtrBase<RotateManipulatorInternalRefPtr> 
     115struct FieldTraits<RotateManipulatorWeakRefPtr> : 
     116    public FieldTraitsFCReferenceCountPointerBase<RotateManipulatorWeakRefPtr> 
    134117{ 
    135118  private: 
    136119 
    137     static DataType             _type; 
     120    static DataType _type; 
    138121 
    139122  public: 
    140123 
    141     typedef FieldTraits<RotateManipulatorInternalRefPtr>  Self; 
     124    typedef FieldTraits<RotateManipulatorWeakRefPtr>  Self; 
    142125 
    143     enum                        { Convertible = NotConvertible }; 
     126    enum { Convertible = NotConvertible }; 
    144127}; 
    145128 
    146 #if !defined(OSG_DOC_DEV_TRAITS) 
    147 /*! \class  FieldTraitsTemplateBase<RotateManipulatorPtr, 0> 
    148     \hideinhierarchy 
    149  */ 
    150 #endif 
    151  
    152 #endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
    153  
    154 #if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
    155129/*! \ingroup GrpContribGUIFieldTraits 
    156130 */ 
     
    160134 
    161135template <> 
    162 struct FieldTraits<ParentRotateManipulatorPtr> : 
    163     public FieldTraitsFCPtrBase<ParentRotateManipulatorPtr> 
     136struct FieldTraits<RotateManipulatorParentPtr> : 
     137    public FieldTraitsFCParentPointerBase<RotateManipulatorParentPtr> 
    164138{ 
    165139  private: 
    166140 
    167     static DataType             _type; 
     141    static DataType _type; 
    168142 
    169143  public: 
    170144 
    171     typedef FieldTraits<ParentRotateManipulatorPtr>  Self; 
     145    typedef FieldTraits<RotateManipulatorParentPtr>  Self; 
    172146 
    173     enum                        { Convertible = NotConvertible }; 
     147    enum { Convertible = NotConvertible }; 
    174148}; 
    175149