Show
Ignore:
Timestamp:
04/02/08 14:28:39 (8 months ago)
Author:
cneumann
Message:

base changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/Contrib/Manipulators/OSGManipulatorFields.h

    r1070 r1073  
    5858#include "OSGContribGUIDef.h" 
    5959 
     60#include "OSGContainerForwards.h" 
    6061#include "OSGRefCountPointer.h" 
    61 #include "OSGParentPtrWrapper.h" 
    6262 
    6363#include "OSGTransformFields.h" 
     
    7575typedef MTRefCountPtrBuilder      <Manipulator>::Ptr ManipulatorMTRefPtr; 
    7676typedef WeakRefCountPtrBuilder    <Manipulator>::Ptr ManipulatorWeakRefPtr; 
    77 typedef ParentPtrBuilder          <Manipulator>::Ptr ManipulatorParentPtr; 
    7877typedef InternalRefCountPtrBuilder<Manipulator>::Ptr ManipulatorInternalRefPtr; 
    7978typedef TransitPtrBuilder         <Manipulator>::Ptr ManipulatorTransitPtr; 
     
    8988 
    9089template <> 
    91 struct FieldTraits<ManipulatorPtr> 
    92     : public FieldTraitsPointerFieldBase<ManipulatorPtr> 
     90struct FieldTraits<ManipulatorPtr> : public PointerFieldTraitsBase<0> 
    9391{ 
    9492  private: 
     
    9896    typedef FieldTraits<ManipulatorPtr>            Self; 
    9997 
    100     typedef MChildFCPointerField   < Manipulator > HandledMChildField; 
    101     typedef MInternalFCPointerField< Manipulator > HandledMInternalField; 
    102     typedef MWeakFCPointerField    < Manipulator > HandledMWeakField; 
    103      
    104     typedef SChildFCPointerField   < Manipulator > HandledSChildField; 
    105     typedef SInternalFCPointerField< Manipulator > HandledSInternalField; 
    106     typedef SWeakFCPointerField    < Manipulator > HandledSWeakField; 
     98    typedef ChildPointerMField     < Manipulator > ChildMField; 
     99    typedef ParentPointerMField    < Manipulator > ParentMField; 
     100    typedef UnrecordedPointerMField< Manipulator > UnrecordedMField; 
     101    typedef WeakPointerMField      < Manipulator > WeakMField; 
     102     
     103    typedef ChildPointerSField     < Manipulator > ChildSField; 
     104    typedef ParentPointerSField    < Manipulator > ParentSField; 
     105    typedef UnrecordedPointerSField< Manipulator > UnrecordedSField; 
     106    typedef WeakPointerSField      < Manipulator > WeakSField; 
    107107     
    108108    enum { Convertible = NotConvertible }; 
     
    110110    static OSG_CONTRIBGUI_DLLMAPPING DataType &getType(void); 
    111111 
    112     static Char8 const *getSChildName(void) 
    113     { 
    114         return "SFManipulatorChildPtr"; 
    115     } 
    116      
    117     static Char8 const *getSInternalName(void) 
    118     { 
    119         return "SFManipulatorInternalPtr"; 
    120     } 
    121      
    122     static Char8 const *getSWeakName(void) 
    123     { 
    124         return "SFManipulatorWeakPtr"; 
    125     } 
    126      
    127     static Char8 const *getMChildName(void) 
    128     { 
    129         return "MFManipulatorChildPtr"; 
    130     } 
    131      
    132     static Char8 const *getMInternalName(void) 
    133     { 
    134         return "MFManipulatorInternalPtr"; 
    135     } 
    136      
    137     static Char8 const *getMWeakName(void) 
    138     { 
    139         return "MFManipulatorWeakPtr"; 
    140     } 
     112    template <enum FieldType::Class> 
     113    static Char8 const *getSName(void); 
     114     
     115    template <enum FieldType::Class> 
     116    static Char8 const *getMName(void); 
    141117     
    142118}; 
    143119 
    144 /*! \ingroup GrpContribGUIFieldTraits 
    145  */ 
    146 #if !defined(OSG_DOC_DEV_TRAITS) 
    147 /*! \hideinhierarchy */ 
    148 #endif 
    149  
    150 template <> 
    151 struct FieldTraits<ManipulatorParentPtr> 
    152     : public FieldTraitsParentPointerFieldBase<ManipulatorParentPtr> 
    153 
    154   private: 
    155     static DataType _type; 
    156  
    157   public: 
    158  
    159     typedef FieldTraits<ManipulatorParentPtr>  Self; 
    160  
    161     typedef MParentFCPointerField< Manipulator > HandledMParentField; 
    162     typedef SParentFCPointerField< Manipulator > HandledSParentField;     
    163      
    164     enum { Convertible = NotConvertible }; 
    165  
    166     static OSG_CONTRIBGUI_DLLMAPPING DataType &getType(void); 
    167  
    168     static Char8 const *getSParentName(void) 
    169     { 
    170         return "SFManipulatorParentPtr"; 
    171     } 
    172     static Char8 const *getMParentName(void) 
    173     { 
    174         return "MFManipulatorParentPtr"; 
    175     } 
    176 }; 
    177  
    178 #if !defined(OSG_DOC_DEV_TRAITS) 
    179 /*! \class  FieldTraitsParentPointerFieldBase<ManipulatorParentPtr, 0> 
    180     \hideinhierarchy 
    181  */ 
    182 #endif 
     120template <> 
     121inline Char8 const * 
     122    FieldTraits<ManipulatorPtr>::getSName<FieldType::CHILD_POINTER_FIELD>( 
     123        void) 
     124
     125    return "SFManipulatorChildPtr"; 
     126
     127 
     128template <> 
     129inline Char8 const * 
     130    FieldTraits<ManipulatorPtr>::getSName<FieldType::PARENT_POINTER_FIELD>( 
     131        void) 
     132
     133    return "SFManipulatorParentPtr"; 
     134
     135 
     136template <> 
     137inline Char8 const * 
     138    FieldTraits<ManipulatorPtr>::getSName<FieldType::UNRECORDED_POINTER_FIELD>( 
     139        void) 
     140
     141    return "SFManipulatorUnrecPtr"; 
     142
     143 
     144template <> 
     145inline Char8 const * 
     146    FieldTraits<ManipulatorPtr>::getSName<FieldType::WEAK_POINTER_FIELD>( 
     147        void) 
     148
     149    return "SFManipulatorWeakPtr"; 
     150
     151 
     152template <> 
     153inline Char8 const * 
     154    FieldTraits<ManipulatorPtr>::getMName<FieldType::CHILD_POINTER_FIELD>( 
     155        void) 
     156
     157    return "MFManipulatorChildPtr"; 
     158
     159 
     160template <> 
     161inline Char8 const * 
     162    FieldTraits<ManipulatorPtr>::getMName<FieldType::PARENT_POINTER_FIELD>( 
     163        void) 
     164
     165    return "MFManipulatorParentPtr"; 
     166
     167 
     168template <> 
     169inline Char8 const * 
     170    FieldTraits<ManipulatorPtr>::getMName<FieldType::UNRECORDED_POINTER_FIELD>( 
     171        void) 
     172
     173    return "MFManipulatorUnrecPtr"; 
     174
     175 
     176template <> 
     177inline Char8 const * 
     178    FieldTraits<ManipulatorPtr>::getMName<FieldType::WEAK_POINTER_FIELD>( 
     179        void) 
     180
     181    return "MFManipulatorWeakPtr"; 
     182
    183183 
    184184#endif // !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
     
    187187/*! \ingroup GrpContribGUIFieldSingle */ 
    188188 
    189 typedef SChildFCPointerField   < Manipulator > SFManipulatorChildPtr; 
    190 typedef SInternalFCPointerField< Manipulator > SFManipulatorInternalPtr; 
    191 typedef SParentFCPointerField  < Manipulator > SFManipulatorParentPtr; 
    192 typedef SWeakFCPointerField    < Manipulator > SFManipulatorWeakPtr; 
     189typedef ChildPointerSField     < Manipulator > SFManipulatorChildPtr; 
     190typedef ParentPointerSField    < Manipulator > SFManipulatorParentPtr; 
     191typedef UnrecordedPointerSField< Manipulator > SFManipulatorUnrecPtr; 
     192typedef WeakPointerSField      < Manipulator > SFManipulatorWeakPtr; 
    193193     
    194194#endif 
     
    198198/*! \ingroup GrpContribGUIFieldMulti */ 
    199199 
    200 typedef MChildFCPointerField   < Manipulator > MFManipulatorChildPtr; 
    201 typedef MInternalFCPointerField< Manipulator > MFManipulatorInternalPtr; 
    202 typedef MParentFCPointerField  < Manipulator > MFManipulatorParentPtr; 
    203 typedef MWeakFCPointerField    < Manipulator > MFManipulatorWeakPtr; 
     200typedef ChildPointerMField     < Manipulator > MFManipulatorChildPtr; 
     201typedef ParentPointerMField    < Manipulator > MFManipulatorParentPtr; 
     202typedef UnrecordedPointerMField< Manipulator > MFManipulatorUnrecPtr; 
     203typedef WeakPointerMField      < Manipulator > MFManipulatorWeakPtr; 
    204204     
    205205#endif