Shadowrun: Awakened 29 September 2011 - Build 871
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
fastdelegate::DelegateMemento Class Reference

#include <FastDelegate.h>

Inheritance diagram for fastdelegate::DelegateMemento:

List of all members.

Public Types

typedef void(detail::GenericClass::* GenericMemFuncType )()

Public Member Functions

void clear ()
void clear ()
 DelegateMemento ()
 DelegateMemento (const DelegateMemento &right)
 DelegateMemento (const DelegateMemento &right)
 DelegateMemento ()
bool empty () const
bool empty () const
bool IsEqual (const DelegateMemento &x) const
bool IsEqual (const DelegateMemento &x) const
bool IsLess (const DelegateMemento &right) const
bool IsLess (const DelegateMemento &right) const
bool operator! () const
bool operator! () const
bool operator< (const DelegateMemento &right)
bool operator< (const DelegateMemento &right)
DelegateMementooperator= (const DelegateMemento &right)
DelegateMementooperator= (const DelegateMemento &right)
bool operator> (const DelegateMemento &right)
bool operator> (const DelegateMemento &right)

Protected Types

typedef void(detail::GenericClass::* GenericMemFuncType )()

Protected Member Functions

void SetMementoFrom (const DelegateMemento &right)
void SetMementoFrom (const DelegateMemento &right)

Protected Attributes

GenericMemFuncType m_pFunction
detail::GenericClass * m_pthis

Detailed Description

Definition at line 559 of file parse/FastDelegate.h.


Member Typedef Documentation

typedef void(detail::GenericClass::* fastdelegate::DelegateMemento::GenericMemFuncType)() [protected]

Definition at line 563 of file parse/FastDelegate.h.

typedef void(detail::GenericClass::* fastdelegate::DelegateMemento::GenericMemFuncType)()

Definition at line 563 of file port/FastDelegate.h.


Constructor & Destructor Documentation

fastdelegate::DelegateMemento::DelegateMemento ( ) [inline]

Definition at line 579 of file parse/FastDelegate.h.

: m_pthis(0), m_pFunction(0) {};
fastdelegate::DelegateMemento::DelegateMemento ( const DelegateMemento right) [inline]

Definition at line 629 of file parse/FastDelegate.h.

                                                    : 
        m_pFunction(right.m_pFunction), m_pthis(right.m_pthis)
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        , m_pStaticFunction (right.m_pStaticFunction)
#endif
        {}
fastdelegate::DelegateMemento::DelegateMemento ( ) [inline]

Definition at line 579 of file port/FastDelegate.h.

: m_pthis(0), m_pFunction(0) {};
fastdelegate::DelegateMemento::DelegateMemento ( const DelegateMemento right) [inline]

Definition at line 629 of file port/FastDelegate.h.

                                                    : 
        m_pFunction(right.m_pFunction), m_pthis(right.m_pthis)
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        , m_pStaticFunction (right.m_pStaticFunction)
#endif
        {}

Member Function Documentation

void fastdelegate::DelegateMemento::clear ( ) [inline]
void fastdelegate::DelegateMemento::clear ( ) [inline]

Definition at line 580 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

{    m_pthis=0; m_pFunction=0;    }
bool fastdelegate::DelegateMemento::empty ( ) const [inline]
bool fastdelegate::DelegateMemento::empty ( ) const [inline]

Definition at line 616 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

    { return m_pthis==0 && m_pFunction==0; }
bool fastdelegate::DelegateMemento::IsEqual ( const DelegateMemento x) const [inline]

Definition at line 593 of file parse/FastDelegate.h.

References m_pFunction, and m_pthis.

Referenced by fastdelegate::FastDelegate8< Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, RetType >::operator!=(), fastdelegate::FastDelegate7< Param1, Param2, Param3, Param4, Param5, Param6, Param7, RetType >::operator!=(), fastdelegate::FastDelegate6< Param1, Param2, Param3, Param4, Param5, Param6, RetType >::operator!=(), fastdelegate::FastDelegate5< Param1, Param2, Param3, Param4, Param5, RetType >::operator!=(), fastdelegate::FastDelegate4< ThreadPoolLocalStorage *, int, AsyncBuffer *, u32, bool >::operator!=(), fastdelegate::FastDelegate3< const char *, const NetAddr *, int, bool >::operator!=(), fastdelegate::FastDelegate2< Param1, Param2, RetType >::operator!=(), fastdelegate::FastDelegate1< Param1, RetType >::operator!=(), fastdelegate::FastDelegate0< RetType >::operator!=(), fastdelegate::FastDelegate8< Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, RetType >::operator==(), fastdelegate::FastDelegate7< Param1, Param2, Param3, Param4, Param5, Param6, Param7, RetType >::operator==(), fastdelegate::FastDelegate6< Param1, Param2, Param3, Param4, Param5, Param6, RetType >::operator==(), fastdelegate::FastDelegate5< Param1, Param2, Param3, Param4, Param5, RetType >::operator==(), fastdelegate::FastDelegate4< ThreadPoolLocalStorage *, int, AsyncBuffer *, u32, bool >::operator==(), fastdelegate::FastDelegate3< const char *, const NetAddr *, int, bool >::operator==(), fastdelegate::FastDelegate2< Param1, Param2, RetType >::operator==(), fastdelegate::FastDelegate1< Param1, RetType >::operator==(), and fastdelegate::FastDelegate0< RetType >::operator==().

                                                        {
        return m_pthis==x.m_pthis && m_pFunction==x.m_pFunction;
    }
bool fastdelegate::DelegateMemento::IsEqual ( const DelegateMemento x) const [inline]

Definition at line 593 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

                                                        {
        return m_pthis==x.m_pthis && m_pFunction==x.m_pFunction;
    }
bool fastdelegate::DelegateMemento::IsLess ( const DelegateMemento right) const [inline]

Definition at line 598 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

                                                           {
        // deal with static function pointers first
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        if (m_pStaticFunction !=0 || right.m_pStaticFunction!=0) 
                return m_pStaticFunction < right.m_pStaticFunction;
#endif
        if (m_pthis !=right.m_pthis) return m_pthis < right.m_pthis;
    // There are no ordering operators for member function pointers, 
    // but we can fake one by comparing each byte. The resulting ordering is
    // arbitrary (and compiler-dependent), but it permits storage in ordered STL containers.
        return memcmp(&m_pFunction, &right.m_pFunction, sizeof(m_pFunction)) < 0;

    }
bool fastdelegate::DelegateMemento::IsLess ( const DelegateMemento right) const [inline]

Definition at line 598 of file parse/FastDelegate.h.

References m_pFunction, and m_pthis.

Referenced by fastdelegate::FastDelegate8< Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, RetType >::operator<(), fastdelegate::FastDelegate7< Param1, Param2, Param3, Param4, Param5, Param6, Param7, RetType >::operator<(), fastdelegate::FastDelegate6< Param1, Param2, Param3, Param4, Param5, Param6, RetType >::operator<(), fastdelegate::FastDelegate5< Param1, Param2, Param3, Param4, Param5, RetType >::operator<(), fastdelegate::FastDelegate4< ThreadPoolLocalStorage *, int, AsyncBuffer *, u32, bool >::operator<(), fastdelegate::FastDelegate3< const char *, const NetAddr *, int, bool >::operator<(), fastdelegate::FastDelegate2< Param1, Param2, RetType >::operator<(), fastdelegate::FastDelegate1< Param1, RetType >::operator<(), fastdelegate::FastDelegate0< RetType >::operator<(), operator<(), fastdelegate::FastDelegate8< Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, RetType >::operator>(), fastdelegate::FastDelegate7< Param1, Param2, Param3, Param4, Param5, Param6, Param7, RetType >::operator>(), fastdelegate::FastDelegate6< Param1, Param2, Param3, Param4, Param5, Param6, RetType >::operator>(), fastdelegate::FastDelegate5< Param1, Param2, Param3, Param4, Param5, RetType >::operator>(), fastdelegate::FastDelegate4< ThreadPoolLocalStorage *, int, AsyncBuffer *, u32, bool >::operator>(), fastdelegate::FastDelegate3< const char *, const NetAddr *, int, bool >::operator>(), fastdelegate::FastDelegate2< Param1, Param2, RetType >::operator>(), fastdelegate::FastDelegate1< Param1, RetType >::operator>(), fastdelegate::FastDelegate0< RetType >::operator>(), and operator>().

                                                           {
        // deal with static function pointers first
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        if (m_pStaticFunction !=0 || right.m_pStaticFunction!=0) 
                return m_pStaticFunction < right.m_pStaticFunction;
#endif
        if (m_pthis !=right.m_pthis) return m_pthis < right.m_pthis;
    // There are no ordering operators for member function pointers, 
    // but we can fake one by comparing each byte. The resulting ordering is
    // arbitrary (and compiler-dependent), but it permits storage in ordered STL containers.
        return memcmp(&m_pFunction, &right.m_pFunction, sizeof(m_pFunction)) < 0;

    }
bool fastdelegate::DelegateMemento::operator! ( ) const [inline]

Definition at line 614 of file parse/FastDelegate.h.

References m_pFunction, and m_pthis.

    { return m_pthis==0 && m_pFunction==0; }
bool fastdelegate::DelegateMemento::operator! ( ) const [inline]

Definition at line 614 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

    { return m_pthis==0 && m_pFunction==0; }
bool fastdelegate::DelegateMemento::operator< ( const DelegateMemento right) [inline]

Definition at line 623 of file parse/FastDelegate.h.

References IsLess().

                                                         {
        return IsLess(right);
    }
bool fastdelegate::DelegateMemento::operator< ( const DelegateMemento right) [inline]

Definition at line 623 of file port/FastDelegate.h.

References IsLess().

                                                         {
        return IsLess(right);
    }
DelegateMemento& fastdelegate::DelegateMemento::operator= ( const DelegateMemento right) [inline]

Definition at line 619 of file port/FastDelegate.h.

References SetMementoFrom().

                                                                 {
        SetMementoFrom(right); 
        return *this;
    }
DelegateMemento& fastdelegate::DelegateMemento::operator= ( const DelegateMemento right) [inline]

Definition at line 619 of file parse/FastDelegate.h.

References SetMementoFrom().

                                                                 {
        SetMementoFrom(right); 
        return *this;
    }
bool fastdelegate::DelegateMemento::operator> ( const DelegateMemento right) [inline]

Definition at line 626 of file parse/FastDelegate.h.

References IsLess().

                                                         {
        return right.IsLess(*this);
    }
bool fastdelegate::DelegateMemento::operator> ( const DelegateMemento right) [inline]

Definition at line 626 of file port/FastDelegate.h.

                                                         {
        return right.IsLess(*this);
    }
void fastdelegate::DelegateMemento::SetMementoFrom ( const DelegateMemento right) [inline, protected]

Definition at line 636 of file port/FastDelegate.h.

References m_pFunction, and m_pthis.

                                                       {
        m_pFunction = right.m_pFunction;
        m_pthis = right.m_pthis;
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        m_pStaticFunction = right.m_pStaticFunction;
#endif
    }
void fastdelegate::DelegateMemento::SetMementoFrom ( const DelegateMemento right) [inline, protected]

Definition at line 636 of file parse/FastDelegate.h.

References m_pFunction, and m_pthis.

Referenced by fastdelegate::detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr >::CopyFrom(), and operator=().

                                                       {
        m_pFunction = right.m_pFunction;
        m_pthis = right.m_pthis;
#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK)
        m_pStaticFunction = right.m_pStaticFunction;
#endif
    }

Member Data Documentation

detail::GenericClass * fastdelegate::DelegateMemento::m_pthis [protected]

The documentation for this class was generated from the following files:

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net