Asposecpplib
|
Represents a pointer to a function, method or a function object. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
Inherits System::Details::DelegateHoldingVariables.
Public Member Functions | |
Delegate ()=default | |
Default constructor. Constructs the delegate object that does not point to anything. More... | |
Delegate (const Delegate &)=delete | |
Delegate & | operator= (const Delegate &)=delete |
Delegate (Delegate &&o) | |
Moving copy constructor. Takes the ownership of an entity pointed to by the specified delegate. More... | |
Delegate & | operator= (Delegate &&o) |
Moving assignment operator. Takes the ownership of an entity pointed to by the specified delegate. More... | |
template<class T > | |
Delegate (T function, typename std::enable_if<!std::is_bind_expression< T >::value &&std::is_pointer< T >::value &&std::is_function< typename std::remove_pointer< T >::type >::value >::type *=0) | |
Constructor. Constructs a delegate object from the specified pointer to free function or static method. More... | |
template<class T > | |
Delegate (T function, typename std::enable_if< std::is_bind_expression< T >::value >::type *=0) | |
Constructor. Constructs a delegate from the specified pointer to the function object generated by std::bind(). More... | |
template<class T > | |
Delegate (int functor_tag, T &functor) | |
Constructor. Constructs a delegate from the specified function object. More... | |
template<class T > | |
Delegate (long functor_tag, T &&functor) | |
Moving constructor. Constructs a delegate from the specified function object. More... | |
template<class MemberType , class ClassType > | |
Delegate (MemberType ClassType::*member, ClassType *obj) | |
Constructor. Constructs a delegate that points to the specified non-static method of the specified object. More... | |
template<class MemberType , class ClassType > | |
Delegate (MemberType ClassType::*member, const SharedPtr< ClassType > &obj) | |
Constructor. Constructs a delegate that points to the specified non-static method of the specified object. More... | |
template<class R , class... Args> | |
Delegate (std::function< R(Args...)> f) | |
Constructs a delegate object that points to an std::function function object. More... | |
ReturnType | operator() (ArgumentTypes... args) |
Invokes a function, method or a function object that is pointed to by current delegate object. More... | |
bool | operator== (const Delegate &f) const |
Compares two delegate objects to check if they point to the same entity. More... | |
bool | Empty () |
Determines if the current delegate object is empty, e.g. does not point to any entity. More... | |
Represents a pointer to a function, method or a function object. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
ReturnType | The return type of a function, method or a function object pointer to which is represented by the class |
ArgumentTypes | The argument list of a function, method or a function object pointer to which is represented by the class |
|
default |
Default constructor. Constructs the delegate object that does not point to anything.
|
delete |
|
inline |
Moving copy constructor. Takes the ownership of an entity pointed to by the specified delegate.
o | The Delegate object to move the pointed to entity from |
|
inline |
Constructor. Constructs a delegate object from the specified pointer to free function or static method.
function | Pointer to a function or a static method that will be pointed to by the newly created Delegate instance |
The | type of the function or static method pointer accepted by the constructor as an argument |
|
inline |
Constructor. Constructs a delegate from the specified pointer to the function object generated by std::bind().
function | Pointer to a "bind expression" - a function pointer generated by std::bind() - that will be pointed to by the newly created Delegate instance |
The | type of the function object generated by std::bind() accepted by the constructor as an argument |
|
inline |
Constructor. Constructs a delegate from the specified function object.
functor_tag | A dummy integer value; this argument is used to resolve ambiguity |
functor | A function object that the newly constructed delegate will point to |
T | The type of the function object accepted by the constructor as an argument |
|
inline |
Moving constructor. Constructs a delegate from the specified function object.
functor_tag | A dummy integer value; this argument is used to resolve ambiguity |
functor | A function object that the newly constructed delegate will point to |
T | The type of the function object accepted by the constructor as an argument |
|
inline |
Constructor. Constructs a delegate that points to the specified non-static method of the specified object.
member | A pointer to the non-static method that the newly created delegate will point to |
obj | A pointer to an object member method of which will be pointed to by the newly created delegate |
MemberType | The type of the non-static method that the constructor accepts as an argument |
ClassType | The type of the object accepted by the constructor as an argument |
|
inline |
Constructor. Constructs a delegate that points to the specified non-static method of the specified object.
member | A pointer to the non-static method that the newly created delegate will point to |
obj | A shard pointer to an object member method of which will be pointed to by the newly created delegate |
MemberType | The type of the non-static method that the constructor accepts as an argument |
ClassType | The type of the object accepted by the constructor as an argument |
|
inline |
Constructs a delegate object that points to an std::function function object.
f | A function object to be pointed to by the newly created delegate object |
R | The return type of the function object accepted by the constructor as an argument |
Args | The argument list of the function object accepted by the constructor as an argument |
|
inline |
Determines if the current delegate object is empty, e.g. does not point to any entity.
|
inline |
Invokes a function, method or a function object that is pointed to by current delegate object.
args | Arguments to pass to the invoked entity |
|
delete |
|
inline |
Moving assignment operator. Takes the ownership of an entity pointed to by the specified delegate.
o | The Delegate object to move the pointed to entity from |
|
inline |
Compares two delegate objects to check if they point to the same entity.
f | A delegate object to compare current delegate object with |