Show
Ignore:
Timestamp:
12/03/07 15:48:13 (1 year ago)
Author:
cneumann
Message:

fixed: compile errors

reference counting


It compiles on linux (when disabling the VRML Loader) and the first
ref counting tests seem to work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/Base/Field/OSGFieldTraits.h

    r928 r1030  
    5151 
    5252#include <boost/mpl/if.hpp> 
     53#include <boost/mpl/identity.hpp> 
    5354 
    5455OSG_BEGIN_NAMESPACE 
     
    464465}; 
    465466 
     467 
     468namespace detail 
     469{ 
     470    template <class TypeT> 
     471    struct ExtractHandledSInternalField 
     472    { 
     473        typedef typename TypeT::HandledSInternalField type; 
     474    }; 
     475     
     476    template <class TypeT> 
     477    struct ExtractHandledSChildField 
     478    { 
     479        typedef typename TypeT::HandledSChildField type; 
     480    }; 
     481     
     482    template <class TypeT> 
     483    struct ExtractHandledSParentField 
     484    { 
     485        typedef typename TypeT::HandledSParentField type; 
     486    }; 
     487 
     488    template <class TypeT> 
     489    struct ExtractHandledSWeakField 
     490    { 
     491        typedef typename TypeT::HandledSWeakField type; 
     492    }; 
     493     
     494     
     495    template <class TypeT> 
     496    struct ExtractHandledMInternalField 
     497    { 
     498        typedef typename TypeT::HandledMInternalField type; 
     499    }; 
     500     
     501    template <class TypeT> 
     502    struct ExtractHandledMChildField 
     503    { 
     504        typedef typename TypeT::HandledMChildField type; 
     505    }; 
     506     
     507    template <class TypeT> 
     508    struct ExtractHandledMParentField 
     509    { 
     510        typedef typename TypeT::HandledMParentField type; 
     511    }; 
     512 
     513    template <class TypeT> 
     514    struct ExtractHandledMWeakField 
     515    { 
     516        typedef typename TypeT::HandledMWeakField type; 
     517    }; 
     518} // namespace detail 
     519 
    466520struct FieldDescBase 
    467521{ 
     
    471525}; 
    472526 
    473 template<class DescT, enum FieldCardinality eFieldCard> 
     527template<class DescT,  
     528         enum  FieldCardinality FieldCardE, 
     529         enum  FieldCategory    FieldCatE  > 
    474530class FieldDescription : public DescT::FieldDescParent 
    475531{ 
     
    477533 
    478534    typedef          FieldDescription<DescT, 
    479                                       eFieldCard> Self; 
    480  
    481  
    482     typedef typename DescT::FieldDescParent       Inherited; 
    483  
    484     typedef typename 
    485       boost::mpl::if_<boost::mpl::bool_<(eFieldCard == SingleField)>, 
    486                       SField<typename DescT::ValueType, 
    487                                       DescT::iNamespace>, 
    488                       MField<typename DescT::ValueType, 
    489                                       DescT::iNamespace, 
    490                              typename DescT::MFAlloc   > >::type HandledField; 
     535                                      FieldCardE, 
     536                                      FieldCatE  > Self; 
     537    typedef typename DescT::FieldDescParent        Inherited; 
     538 
     539    typedef typename EvalSwitch5< 
     540        FieldCatE == DataField, 
     541            boost::mpl::identity<SField<typename DescT::ValueType, 
     542                                                 DescT::iNamespace> >, 
     543        FieldCatE == InternalPointerField, 
     544            detail::ExtractHandledSInternalField<DescT>, 
     545        FieldCatE == ChildPointerField, 
     546            detail::ExtractHandledSChildField   <DescT>, 
     547        FieldCatE == ParentPointerField, 
     548            detail::ExtractHandledSParentField  <DescT>, 
     549        FieldCatE == WeakPointerField, 
     550            detail::ExtractHandledSWeakField    <DescT>, 
     551            boost::mpl::identity<void>                  >::type  HandledSField; 
     552     
     553    typedef typename EvalSwitch5< 
     554        FieldCatE == DataField, 
     555            boost::mpl::identity<MField<typename DescT::ValueType, 
     556                                                 DescT::iNamespace, 
     557                                        typename DescT::MFAlloc    > >, 
     558        FieldCatE == InternalPointerField, 
     559            detail::ExtractHandledMInternalField<DescT>, 
     560        FieldCatE == ChildPointerField, 
     561            detail::ExtractHandledMChildField   <DescT>, 
     562        FieldCatE == ParentPointerField, 
     563            detail::ExtractHandledMParentField  <DescT>, 
     564        FieldCatE == WeakPointerField, 
     565            detail::ExtractHandledMWeakField    <DescT>, 
     566            boost::mpl::identity<void>                   >::type HandledMField; 
     567     
     568    typedef typename  
     569        boost::mpl::if_c<FieldCardE == SingleField, 
     570                         HandledSField, 
     571                         HandledMField             >::type       HandledField; 
    491572 
    492573    typedef typename HandledField::GetHandle    GetHandle; 
     
    515596 
    516597    typedef typename 
    517         boost::mpl::if_<boost::mpl::bool_<(eFieldCard == SingleField)>, 
     598        boost::mpl::if_<boost::mpl::bool_<(FieldCardE == SingleField)>, 
    518599                         SFieldFunctions, 
    519600                         MFieldFunctions>::type FieldFunctions;