Qualia
0.2
|
Wraps a function or member pointer into a Behavior Tree Node. More...
#include <FunctionCall.h>
Public Member Functions | |
BEHAVIOR_STATUS | execute (void *agent) |
This method is invoked by the node's parent when the node should be run. More... | |
void | init (void *agent) |
This method will be invoked before the node is executed for the first time. More... | |
FunctionCall (void(T::*_func)(void *_arg), void *_arg=(void *) NULL) | |
FunctionCall (void(*_func)(void *_arg), void *_arg=(void *) NULL) | |
FunctionCall (void(T::*const _func)(void *_arg) const, void *_arg=(void *) NULL) | |
template<> | |
BEHAVIOR_STATUS | execute (void *agent) |
This method is invoked by the node's parent when the node should be run. More... | |
![]() | |
virtual | ~BehaviorTreeNode () |
Private Attributes | |
void(T::*const | func )(void *_arg) |
void(*const | func2 )(void *_arg) |
void * | arg |
Wraps a function or member pointer into a Behavior Tree Node.
To wrap a void function pointer or static class member that takes a generic void* argument , instantiate FunctionCall without a type argument. For example, to wrap the function "func", with the signature "void func(void*)" and the argument "arg", one would do this: FunctionCall<> functionNode(&func,arg);
To wrap the static method "sMethod" of the class "Class", one would do this: FunctionCall<> staticMethodNode(&Class::sMethod,arg);
To wrap a non-static class member, FunctionCall must be parameterized with the class's type. For example, to wrap the method "method" of class "Class", one would do this: FunctionCall<Class> classMethodNode(&Class:method,arg);
|
inline |
_func | the address of the (non-static) class member |
_arg | the genericized argument to the function |
|
inline |
_func | the address of the function or the static class member |
_arg | the genericized argument to the function |
|
inline |
_func | the address of the const non-static class member |
_arg | the genericized argument to the function |
|
inlinevirtual |
This method is invoked by the node's parent when the node should be run.
Implements BehaviorTree::BehaviorTreeNode.
|
virtual |
This method is invoked by the node's parent when the node should be run.
Implements BehaviorTree::BehaviorTreeNode.
|
inlinevirtual |
This method will be invoked before the node is executed for the first time.
Implements BehaviorTree::BehaviorTreeNode.
|
private |
|
private |
|
private |