Go to the documentation of this file.
37 return {
InputPort(
"code",
"Piece of code that can be parsed. Must return false or "
56 throw RuntimeError(
"Missing port [code] in ScriptCondition");
Result getInput(const std::string &key, T &destination) const
Expected< ScriptFunction > ParseScript(const std::string &script)
const NodeConfig & config() const
std::pair< std::string, PortInfo > InputPort(StringView name, StringView description={})
std::function< Any(Ast::Environment &env)> ScriptFunction
ScriptCondition(const std::string &name, const NodeConfig &config)
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
Execute a script, and if the result is true, return SUCCESS, FAILURE otherwise.
Blackboard::Ptr blackboard
std::unordered_map< std::string, PortInfo > PortsList
void setRegistrationID(StringView ID)
const std::string & name() const
Name of the instance, not the type.
std::shared_ptr< ScriptingEnumsRegistry > enums
static PortsList providedPorts()
The Environment class is used to encapsulate the information and states needed by the scripting langu...