AutoAPMS
Streamlining behaviors in ROS 2
Loading...
Searching...
No Matches
TreeResourceIdentity Struct Reference

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

#include <auto_apms_behavior_tree_core/tree/tree_resource.hpp>

Inheritance diagram for TreeResourceIdentity:

Public Member Functions

 TreeResourceIdentity (const std::string &identity)
 Constructor of a tree resource identity object.
 
 TreeResourceIdentity (const char *identity)
 Constructor of a tree resource identity object.
 
 TreeResourceIdentity ()=default
 Constructor of an empty behavior tree resource identity object.
 
- Public Member Functions inherited from BehaviorResourceIdentity
 BehaviorResourceIdentity (const std::string &identity)
 Constructor of a behavior resource identity object.
 
 BehaviorResourceIdentity (const std::string &identity, const std::string &default_category)
 Constructor of a behavior resource identity object.
 
 BehaviorResourceIdentity (const char *identity)
 Constructor of a behavior resource identity object.
 
 BehaviorResourceIdentity ()=default
 Constructor of an empty behavior resource identity object.
 
std::string str () const
 Create the corresponding identity string.
 
bool empty () const
 Determine whether this behavior resource identity object is considered empty.
 

Public Attributes

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.
 
- Public Attributes inherited from BehaviorResourceIdentity
std::string category_name
 Name of the category this behavior resource belongs to.
 
std::string package_name
 Name of the package that registers the behavior resource.
 
std::string behavior_alias
 Alias for a single registered behavior.
 

Detailed Description

Struct that encapsulates the identity string for a registered 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 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 53 of file tree_resource.cpp.

◆ TreeResourceIdentity() [3/3]

TreeResourceIdentity ( )
default

Constructor of an empty behavior tree resource identity object.

The user must manually populate the member fields.

Member Data Documentation

◆ file_stem

std::string file_stem

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

Definition at line 60 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 62 of file tree_resource.hpp.


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