Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2010, 4:56:37 PM (14 years ago)
Author:
landauf
Message:

re-implemented Functor - without macros!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/FunctorPtr.h

    r7205 r7212  
    3737    typedef SharedPtr<Functor> FunctorPtr;
    3838
    39     typedef SharedChildPtr<FunctorStatic, FunctorPtr> FunctorStaticPtr;
    40 
    4139    template <class T>
    4240    class FunctorMemberPtr : public SharedChildPtr<FunctorMember<T>, FunctorPtr>
     
    4745            inline FunctorMemberPtr(const SharedPtr<FunctorMember<T> >& other) : SharedChildPtr<FunctorMember<T>, FunctorPtr>(other) {}
    4846    };
     47
     48    typedef FunctorMemberPtr<void> FunctorStaticPtr;
     49
     50    template <class F, class T>
     51    class FunctorPointerPtr : public SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> >
     52    {
     53        public:
     54            inline FunctorPointerPtr() : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> >() {}
     55            inline FunctorPointerPtr(FunctorPointer<F, T>* pointer) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> >(pointer) {}
     56            inline FunctorPointerPtr(const SharedPtr<FunctorPointer<F, T> >& other) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> >(other) {}
     57    };
    4958}
    5059
Note: See TracChangeset for help on using the changeset viewer.