|
WSF
|
#include <WsfBehaviorTree.hpp>


Public Member Functions | |
| WsfBehaviorTree (const WsfScenario &aScenario) | |
| WsfBehaviorTree (const WsfBehaviorTree &aSrc) | |
| WsfBehaviorTree & | operator= (const WsfBehaviorTree &aRhs) |
| WsfBehaviorTree * | Clone () const override |
| ~WsfBehaviorTree () override | |
| WsfBehaviorTreeNode * | CreateNode (UtInput &aInput) |
| bool | ProcessInput (UtInput &aInput) override |
| bool | Execute (double simTime) |
| bool | Initialize (double aSimTime, WsfScriptProcessor *aParentPtr, WsfScriptContext *aParentContextPtr=nullptr) |
| WsfBehaviorTreeParallelNode * | RootNode () const |
| WsfScriptProcessor * | ParentProcessor () |
| WsfBehaviorTreeNode * | FindNode (const std::string &aNodeName) const |
| void | FindLastExecuted (std::vector< WsfBehaviorTreeNode * > &aLastExecuted) const |
| size_t | NodeCount () const |
| WsfBehaviorTreeLeafNode * | NodeEntry (size_t aIndex) const |
| void | RegisterBehaviorNode (WsfBehaviorTreeLeafNode *aNodePtr) |
| WsfSimulation * | GetSimulation () |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| WsfBehaviorTree::WsfBehaviorTree | ( | const WsfScenario & | aScenario | ) |
References WsfObject::WsfObject().
Referenced by Clone(), operator=(), and WsfBehaviorTree().
| WsfBehaviorTree::WsfBehaviorTree | ( | const WsfBehaviorTree & | aSrc | ) |
|
override |
|
overridevirtual |
Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.
Implements WsfObject.
References WsfBehaviorTree().
Referenced by WsfScriptStateMachine::State::State(), and WsfScriptProcessor::WsfScriptProcessor().
| WsfBehaviorTreeNode * WsfBehaviorTree::CreateNode | ( | UtInput & | aInput | ) |
References WsfBehaviorTreeNode::AddChild(), WsfObjectTypeList< T >::Clone(), CreateNode(), WsfScenario::FromInput(), WsfScenario::GetBehaviorTreeNodeTypes(), WsfBehaviorTreeNode::ProcessInput(), WsfBehaviorTreeNode::SetFilePath(), and WsfBehaviorTreeNode::SetTree().
Referenced by CreateNode(), and ProcessInput().
| bool WsfBehaviorTree::Execute | ( | double | simTime | ) |
References simTime.
| void WsfBehaviorTree::FindLastExecuted | ( | std::vector< WsfBehaviorTreeNode * > & | aLastExecuted | ) | const |
Provides information on what the behavior tree is "currently" doing.
| aLastExecuted | Returns the last nodes that were executed. |
References WsfBehaviorTreeNode::FindLastExecuted().
Referenced by UT_DEFINE_SCRIPT_METHOD().
| WsfBehaviorTreeNode * WsfBehaviorTree::FindNode | ( | const std::string & | aNodeName | ) | const |
References WsfBehaviorTreeNode::FindNode().
Referenced by UT_DEFINE_SCRIPT_METHOD().
| WsfSimulation * WsfBehaviorTree::GetSimulation | ( | ) |
References WsfSimulation::GetScriptContext(), and WsfScriptContext::GetSimulation().
| bool WsfBehaviorTree::Initialize | ( | double | aSimTime, |
| WsfScriptProcessor * | aParentPtr, | ||
| WsfScriptContext * | aParentContextPtr = nullptr ) |
References WsfScriptContext::Initialize().
| size_t WsfBehaviorTree::NodeCount | ( | ) | const |
Referenced by UT_DEFINE_SCRIPT_METHOD().
| WsfBehaviorTreeLeafNode * WsfBehaviorTree::NodeEntry | ( | size_t | aIndex | ) | const |
Referenced by UT_DEFINE_SCRIPT_METHOD().
| WsfBehaviorTree & WsfBehaviorTree::operator= | ( | const WsfBehaviorTree & | aRhs | ) |
|
inline |
Referenced by WsfBehaviorTreeNode::OwningProcessor().
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References CreateNode(), and WsfBehaviorTreeNode::SetFilePath().
| void WsfBehaviorTree::RegisterBehaviorNode | ( | WsfBehaviorTreeLeafNode * | aNodePtr | ) |
|
inline |
Referenced by UT_DEFINE_SCRIPT_METHOD().