AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
Script Class Reference

Class that encapsulates behavior tree script expressions. More...

#include <auto_apms_behavior_tree_core/tree/script.hpp>

Public Member Functions

 Script ()=default
 Create an empty script.
 
 Script (std::vector< std::string > expressions)
 Create a script with multiple expressions.
 
 Script (const std::string &str)
 Create a script with a single expression.
 
 Script (const char *str)
 Create a script with a single expression.
 
std::string str () const
 Concatenate all expressions of this instance to a single string.
 

Detailed Description

Class that encapsulates behavior tree script expressions.

Users may create a script expression by passing a string. More expression can be added using the plus operator. Each expressions is validated at the time of construction.

See also
https://www.behaviortree.dev/docs/guides/scripting

Definition at line 29 of file script.hpp.

Constructor & Destructor Documentation

◆ Script() [1/4]

Script ( )
default

Create an empty script.

◆ Script() [2/4]

Script ( std::vector< std::string > expressions)

Create a script with multiple expressions.

Parameters
expressionsVector of expression strings.
Exceptions
auto_apms_behavior_tree::exceptions::ScriptErrorif script validation fails.

Definition at line 24 of file script.cpp.

◆ Script() [3/4]

Script ( const std::string & str)

Create a script with a single expression.

Parameters
strExpression string.
Exceptions
auto_apms_behavior_tree::exceptions::ScriptErrorif script validation fails.

Definition at line 31 of file script.cpp.

◆ Script() [4/4]

Script ( const char * str)

Create a script with a single expression.

Parameters
strC-style expression string.
Exceptions
auto_apms_behavior_tree::exceptions::ScriptErrorif script validation fails.

Definition at line 33 of file script.cpp.

Member Function Documentation

◆ str()

std::string str ( ) const

Concatenate all expressions of this instance to a single string.

Returns
String representing the script.

Definition at line 41 of file script.cpp.


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