Functions | Variables
ros::names Namespace Reference

Contains functions which allow you to manipulate ROS names. More...

Functions

ROSCPP_DECL std::string append (const std::string &left, const std::string &right)
 Append one name to another. More...
 
ROSCPP_DECL std::string clean (const std::string &name)
 Cleans a graph resource name: removes double slashes, trailing slash. More...
 
const ROSCPP_DECL M_stringgetRemappings ()
 
const ROSCPP_DECL M_stringgetUnresolvedRemappings ()
 
void init (const M_string &remappings)
 
bool isValidCharInName (char c)
 
ROSCPP_DECL std::string parentNamespace (const std::string &name)
 Get the parent namespace of a name. More...
 
ROSCPP_DECL std::string remap (const std::string &name)
 Apply remappings to a name. More...
 
ROSCPP_DECL std::string resolve (const std::string &name, bool remap=true)
 Resolve a graph resource name into a fully qualified graph resource name. More...
 
ROSCPP_DECL std::string resolve (const std::string &ns, const std::string &name, bool remap=true)
 Resolve a graph resource name into a fully qualified graph resource name. More...
 
ROSCPP_DECL bool validate (const std::string &name, std::string &error)
 Validate a name against the name spec. More...
 

Variables

M_string g_remappings
 
M_string g_unresolved_remappings
 

Detailed Description

Contains functions which allow you to manipulate ROS names.

Function Documentation

◆ append()

std::string ros::names::append ( const std::string &  left,
const std::string &  right 
)

Append one name to another.

Definition at line 118 of file names.cpp.

◆ clean()

std::string ros::names::clean ( const std::string &  name)

Cleans a graph resource name: removes double slashes, trailing slash.

Definition at line 99 of file names.cpp.

◆ getRemappings()

const M_string & ros::names::getRemappings ( )

Definition at line 46 of file names.cpp.

◆ getUnresolvedRemappings()

const M_string & ros::names::getUnresolvedRemappings ( )

Definition at line 51 of file names.cpp.

◆ init()

void ros::names::init ( const M_string remappings)

Definition at line 187 of file names.cpp.

◆ isValidCharInName()

bool ros::names::isValidCharInName ( char  c)

Definition at line 56 of file names.cpp.

◆ parentNamespace()

std::string ros::names::parentNamespace ( const std::string &  name)

Get the parent namespace of a name.

Parameters
nameThe namespace of which to get the parent namespace.
Exceptions
InvalidNameExceptionif the name passed is not a valid graph resource name

Definition at line 206 of file names.cpp.

◆ remap()

std::string ros::names::remap ( const std::string &  name)

Apply remappings to a name.

Exceptions
InvalidNameExceptionif the name passed is not a valid graph resource name

Definition at line 123 of file names.cpp.

◆ resolve() [1/2]

std::string ros::names::resolve ( const std::string &  name,
bool  remap = true 
)

Resolve a graph resource name into a fully qualified graph resource name.

See http://wiki.ros.org/Names for more details

Parameters
nameName to resolve
remapWhether or not to apply remappings to the name
Exceptions
InvalidNameExceptionif the name passed is not a valid graph resource name

Definition at line 136 of file names.cpp.

◆ resolve() [2/2]

std::string ros::names::resolve ( const std::string &  ns,
const std::string &  name,
bool  remap = true 
)

Resolve a graph resource name into a fully qualified graph resource name.

See http://wiki.ros.org/Names for more details

Parameters
nsNamespace to use in resolution
nameName to resolve
remapWhether or not to apply remappings to the name
Exceptions
InvalidNameExceptionif the name passed is not a valid graph resource name

Definition at line 142 of file names.cpp.

◆ validate()

bool ros::names::validate ( const std::string &  name,
std::string &  error 
)

Validate a name against the name spec.

Definition at line 66 of file names.cpp.

Variable Documentation

◆ g_remappings

M_string ros::names::g_remappings

Definition at line 43 of file names.cpp.

◆ g_unresolved_remappings

M_string ros::names::g_unresolved_remappings

Definition at line 44 of file names.cpp.



roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas , Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36