24#ifndef GOBY_MIDDLEWARE_TRANSPORT_IDENTIFIER_H
25#define GOBY_MIDDLEWARE_TRANSPORT_IDENTIFIER_H
31#include <unordered_map>
79 std::unordered_map<int, std::string>* schemes_buffer =
nullptr,
80 std::unordered_map<std::thread::id, std::string>* threads_buffer =
nullptr);
84 const std::string& identifier);
87 template <
typename Data,
int scheme>
94 template <
typename Data,
int scheme>
110 template <
typename Key>
111 static const std::string& id_component(
const Key& k, std::unordered_map<Key, std::string>& map)
113 auto it = map.find(k);
118 auto it_pair = map.insert(std::make_pair(k, v));
119 return it_pair.first->second;
123 static const std::string delimiter_str_;
124 const std::string process_{std::to_string(getpid())};
125 std::unordered_map<int, std::string> schemes_;
126 std::unordered_map<std::thread::id, std::string> threads_;
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS,...
static std::string make_identifier(const std::string &type_name, int scheme, const std::string &group, IdentifierWildcard wildcard, const std::string &process, std::unordered_map< int, std::string > *schemes_buffer=nullptr, std::unordered_map< std::thread::id, std::string > *threads_buffer=nullptr)
std::string _make_identifier(const goby::middleware::Group &group, IdentifierWildcard wildcard)
static std::tuple< std::string, int, std::string, int, std::size_t > parse_identifier(const std::string &identifier)
std::string _make_identifier(const Data &d, const goby::middleware::Group &group, IdentifierWildcard wildcard)
static const char delimiter_substitute
static const char delimiter
static const char end_delimiter
std::string _make_identifier(const std::string &type_name, int scheme, const std::string &group, IdentifierWildcard wildcard)
goby::util::logger::GroupSetter group(std::string n)
constexpr int scheme()
Placeholder to provide an interface for the scheme() function family.
std::string thread_id(std::thread::id i=std::this_thread::get_id())
@ PROCESS_THREAD_WILDCARD
std::string identifier_part_to_string(int i)
The global namespace for the Goby project.
static std::string to_string(int e)
Convert a known marshalling scheme to a human-readable string or an unknown scheme to the string repr...
Class for parsing and serializing a given marshalling scheme. Must be specialized for a particular sc...