Namespaces | Functions
string_utils/ros.hpp File Reference

Specializations of cras::to_string() for ROS types and messages. Parsing of dates. More...

#include <sstream>
#include <string>
#include <type_traits>
#include <ros/duration.h>
#include <ros/rate.h>
#include <ros/time.h>
#include <ros/message_traits.h>
#include <cras_cpp_common/optional.hpp>
#include <cras_cpp_common/string_utils.hpp>
#include <cras_cpp_common/time_utils.hpp>
Include dependency graph for string_utils/ros.hpp:

Go to the source code of this file.

Namespaces

 cras
 

Functions

template<typename D = ::ros::Duration, typename ::std::enable_if_t< ::std::is_same< D, ::ros::Duration >::value||::std::is_same< D, ::ros::WallDuration >::value > * = nullptr>
cras::parseDuration (const ::std::string &s)
 Parse the given string as duration. More...
 
template<typename T = ::ros::Time, typename ::std::enable_if_t< ::std::is_same< T, ::ros::Time >::value||::std::is_same< T, ::ros::WallTime >::value||::std::is_same< T, ::ros::SteadyTime >::value > * = nullptr>
cras::parseTime (const ::std::string &s, const ::cras::optional< typename ::cras::DurationType< T >::value > &timezoneOffset={}, const T &referenceDate={})
 Parse the given string as time. More...
 
template<typename D = ::ros::Duration, typename ::std::enable_if_t< ::std::is_same< D, ::ros::Duration >::value||::std::is_same< D, ::ros::WallDuration >::value > * = nullptr>
cras::parseTimezoneOffset (const ::std::string &s)
 Parse timezone offset from the given string. More...
 
template<typename T , typename ::std::enable_if_t< ::std::is_same< T, ::ros::Time >::value||::std::is_same< T, ::ros::WallTime >::value||::std::is_same< T, ::ros::SteadyTime >::value > * = nullptr>
::std::string cras::to_pretty_string (const T &value)
 Convert the given time to a human-readable date-time representation according to ISO 8601. More...
 
template<typename M , ::std::enable_if_t<::ros::message_traits::IsMessage< M >::value > * = nullptr>
std::string cras::to_string (const M &msg)
 
template<typename T , typename ::std::enable_if_t< ::std::is_same< T, ::ros::Time >::value||::std::is_same< T, ::ros::WallTime >::value||::std::is_same< T, ::ros::SteadyTime >::value||::std::is_same< T, ::ros::Duration >::value||::std::is_same< T, ::ros::WallDuration >::value > * = nullptr>
inline ::std::string cras::to_string (const T &value)
 

Detailed Description

Specializations of cras::to_string() for ROS types and messages. Parsing of dates.

Author
Martin Pecka

Definition in file string_utils/ros.hpp.



cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Dec 14 2024 03:51:04