iaux::iaDelegate< R, Args > Class Template Reference

#include <iaEvent.h>

Public Member Functions

 iaDelegate ()=default
 
 iaDelegate (R(*function)(Args...))
 
template<typename T >
 iaDelegate (T *instance, R(T::*method)(Args...))
 
 iaDelegate (const iaDelegate &other)
 
 ~iaDelegate ()
 
void clear ()
 
void getInfo (std::wostream &stream) const
 
operator() (Args... args) const
 
const iaDelegateoperator= (const iaDelegate &other)
 
bool operator== (const iaDelegate< R, Args... > &delegate) const
 
bool operator!= (const iaDelegate< R, Args... > &delegate) const
 
bool isValid () const
 

Detailed Description

template<typename R, typename... Args>
class iaux::iaDelegate< R, Args >

a delegate that wraps a function or method

Constructor & Destructor Documentation

◆ iaDelegate() [1/4]

template<typename R , typename... Args>
iaux::iaDelegate< R, Args >::iaDelegate ( )
default

does nothing

◆ iaDelegate() [2/4]

template<typename R , typename... Args>
iaux::iaDelegate< R, Args >::iaDelegate ( R(*)(Args...)  function)
inline

initializes with a function pointer

◆ iaDelegate() [3/4]

template<typename R , typename... Args>
template<typename T >
iaux::iaDelegate< R, Args >::iaDelegate ( T *  instance,
R(T::*)(Args...)  method 
)
inline

initializes with a method and instance

◆ iaDelegate() [4/4]

template<typename R , typename... Args>
iaux::iaDelegate< R, Args >::iaDelegate ( const iaDelegate< R, Args > &  other)
inline

copy ctor

Parameters
otherthe other delegate

◆ ~iaDelegate()

template<typename R , typename... Args>
iaux::iaDelegate< R, Args >::~iaDelegate ( )
inline

cleanup

Member Function Documentation

◆ clear()

template<typename R , typename... Args>
void iaux::iaDelegate< R, Args >::clear ( )
inline

clears delegate and makes it invalid

◆ getInfo()

template<typename R , typename... Args>
void iaux::iaDelegate< R, Args >::getInfo ( std::wostream &  stream) const
inline

get info in to stream

Parameters
[out]streamthe stream to put the infor in

◆ isValid()

template<typename R , typename... Args>
bool iaux::iaDelegate< R, Args >::isValid ( ) const
inline

◆ operator!=()

template<typename R , typename... Args>
bool iaux::iaDelegate< R, Args >::operator!= ( const iaDelegate< R, Args... > &  delegate) const
inline

tests if two delegates are not equal

Parameters
delegatethe other delegate to test against

◆ operator()()

template<typename R , typename... Args>
R iaux::iaDelegate< R, Args >::operator() ( Args...  args) const
inline

executes the bound function or method

◆ operator=()

template<typename R , typename... Args>
const iaDelegate & iaux::iaDelegate< R, Args >::operator= ( const iaDelegate< R, Args > &  other)
inline

assignment operator

Parameters
otherthe other delegate

◆ operator==()

template<typename R , typename... Args>
bool iaux::iaDelegate< R, Args >::operator== ( const iaDelegate< R, Args... > &  delegate) const
inline

tests if two delegates are equal

Parameters
delegatethe other delegate to test against

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