AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
TreeResourceIdentity Struct Reference

Struct that encapsulates the identity string for a declared behavior tree. More...

#include <auto_apms_behavior_tree_core/tree/tree_resource.hpp>

Public Member Functions

 TreeResourceIdentity (const std::string &identity)
 Constructor of a behavior tree resource identity object.
 
 TreeResourceIdentity (const char *identity)
 Constructor of a tree resource identity object.
 
 TreeResourceIdentity ()=default
 Constructor of an empty tree resource identity object.
 
std::string str () const
 Create the corresponding identity string.
 
bool empty () const
 Determine whether this tree resource identity object is considered empty.
 

Public Attributes

std::string package_name
 Name of the package that registers the resource.
 
std::string file_stem
 Name of the file (without extension) that contains the resource's tree document.
 
std::string tree_name
 Name of a specific tree inside the resource's tree document.
 

Detailed Description

Struct that encapsulates the identity string for a declared behavior tree.

Its only purpose is to create the corresponding instance of TreeResource.

Definition at line 32 of file tree_resource.hpp.

Constructor & Destructor Documentation

◆ TreeResourceIdentity() [1/3]

TreeResourceIdentity ( const std::string & identity)

Constructor of a behavior tree resource identity object.

identity must be formatted like <package_name>::<tree_file_stem>::<tree_name>.

Parameters
identityIdentity string for a specific behavior tree resource.
Exceptions
auto_apms_util::exceptions::ResourceIdentityFormatErrorif the identity string has wrong format.

Definition at line 31 of file tree_resource.cpp.

◆ TreeResourceIdentity() [2/3]

TreeResourceIdentity ( const char * identity)

Constructor of a tree resource identity object.

identity must be formatted like <package_name>::<tree_file_stem>::<tree_name>.

Parameters
identityC-style identity string for a specific behavior tree resource.
Exceptions
auto_apms_util::exceptions::ResourceIdentityFormatErrorif the identity string has wrong format.

Definition at line 52 of file tree_resource.cpp.

◆ TreeResourceIdentity() [3/3]

TreeResourceIdentity ( )
default

Constructor of an empty tree resource identity object.

The user must manually populate the member fields according to the resource this object should identify.

Member Function Documentation

◆ str()

std::string str ( ) const

Create the corresponding identity string.

Returns
Identity string for a behavior tree resource.

Definition at line 58 of file tree_resource.cpp.

◆ empty()

bool empty ( ) const

Determine whether this tree resource identity object is considered empty.

Returns
true if none of the member fields are set, false otherwise.

Definition at line 60 of file tree_resource.cpp.

Member Data Documentation

◆ package_name

std::string package_name

Name of the package that registers the resource.

Definition at line 76 of file tree_resource.hpp.

◆ file_stem

std::string file_stem

Name of the file (without extension) that contains the resource's tree document.

Definition at line 78 of file tree_resource.hpp.

◆ tree_name

std::string tree_name

Name of a specific tree inside the resource's tree document.

Definition at line 80 of file tree_resource.hpp.


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