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

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

#include <auto_apms_behavior_tree_core/behavior.hpp>

Inheritance diagram for BehaviorResourceIdentity:

Public Member Functions

 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 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.

Definition at line 37 of file behavior.hpp.

Constructor & Destructor Documentation

◆ BehaviorResourceIdentity() [1/4]

BehaviorResourceIdentity ( const std::string & identity)

Constructor of a behavior resource identity object.

identity must be formatted like <category_name>/<package_name>::<behavior_alias>.

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

Definition at line 28 of file behavior.cpp.

◆ BehaviorResourceIdentity() [2/4]

BehaviorResourceIdentity ( const std::string & identity,
const std::string & default_category )

Constructor of a behavior resource identity object.

identity must be formatted like <category_name>/<package_name>::<behavior_alias>.

Parameters
identityIdentity string for a specific behavior resource.
default_categoryName of the default category assigned if none is provided with the identity string.
Exceptions
auto_apms_util::exceptions::ResourceIdentityFormatErrorif the identity string has wrong format.

Definition at line 65 of file behavior.cpp.

◆ BehaviorResourceIdentity() [3/4]

BehaviorResourceIdentity ( const char * identity)

Constructor of a behavior resource identity object.

identity must be formatted like <category_name>/<package_name>::<behavior_alias>.

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

Definition at line 74 of file behavior.cpp.

◆ BehaviorResourceIdentity() [4/4]

Constructor of an empty behavior resource identity object.

The user must manually populate the member fields.

Member Function Documentation

◆ str()

std::string str ( ) const

Create the corresponding identity string.

Returns
Identity string for a behavior resource.

Definition at line 83 of file behavior.cpp.

◆ empty()

bool empty ( ) const

Determine whether this behavior resource identity object is considered empty.

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

Definition at line 93 of file behavior.cpp.

Member Data Documentation

◆ category_name

std::string category_name

Name of the category this behavior resource belongs to.

Definition at line 93 of file behavior.hpp.

◆ package_name

std::string package_name

Name of the package that registers the behavior resource.

Definition at line 95 of file behavior.hpp.

◆ behavior_alias

std::string behavior_alias

Alias for a single registered behavior.

Definition at line 97 of file behavior.hpp.


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