Qualia  0.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BehaviorTree::CountLimitNode Class Reference

Limit the number of times this tree section can execute before it becomes blocked off. More...

#include <CountLimitNode.h>

Inheritance diagram for BehaviorTree::CountLimitNode:
Inheritance graph
[legend]
Collaboration diagram for BehaviorTree::CountLimitNode:
Collaboration graph
[legend]

Public Member Functions

 CountLimitNode (int limit, bool allow_reinitialize=true)
 
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...
 
- Public Member Functions inherited from BehaviorTree::BehaviorTreeDecoratorNode
 BehaviorTreeDecoratorNode ()
 
virtual ~BehaviorTreeDecoratorNode ()
 
virtual BehaviorTreeNodesetChild (BehaviorTreeNode *node)
 Sets the child node of this node. More...
 
- Public Member Functions inherited from BehaviorTree::BehaviorTreeNode
virtual ~BehaviorTreeNode ()
 

Private Member Functions

void initChild (void *agent)
 

Private Attributes

int limit
 
int current_rep
 
bool allow_reinitialize
 

Additional Inherited Members

- Public Attributes inherited from BehaviorTree::BehaviorTreeDecoratorNode
BehaviorTreeNodechild
 This node's child node. More...
 

Detailed Description

Limit the number of times this tree section can execute before it becomes blocked off.

Constructor & Destructor Documentation

CountLimitNode::CountLimitNode ( int  limit,
bool  allow_reinitialize = true 
)
Parameters
limitThe number of times the tree section can execute before it becomes blocked off.
allow_reinitializeIf true, when this node's init method is called, the restriction is lifted. Otherwise, the restriction is never lifted.

Member Function Documentation

BEHAVIOR_STATUS CountLimitNode::execute ( void *  agent)
virtual

This method is invoked by the node's parent when the node should be run.

Implements BehaviorTree::BehaviorTreeDecoratorNode.

void CountLimitNode::init ( void *  agent)
virtual

This method will be invoked before the node is executed for the first time.

Implements BehaviorTree::BehaviorTreeDecoratorNode.

void CountLimitNode::initChild ( void *  agent)
private

Member Data Documentation

bool BehaviorTree::CountLimitNode::allow_reinitialize
private
int BehaviorTree::CountLimitNode::current_rep
private
int BehaviorTree::CountLimitNode::limit
private

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