Gazebo Transport

API Reference

14.0.0

The Descriptor class provides meta-information about what a log contains. This may be useful for determining QueryOptions or for generating a high-level overview of a Log's contents. More...

#include <Descriptor.hh>

Public Types

using NameToId = std::map< std::string, int64_t >
 A map from a name (e.g. topic name or message type name) to the id of a row in one of the database tables. (name -> id)
 
using NameToMap = std::map< std::string, NameToId >
 A map from a name to a map from a name to a row ID. (name -> name -> id)
 

Public Member Functions

 Descriptor (Descriptor &&_orig)
 Move constructor, not used by most.
 
 ~Descriptor ()
 Destructor.
 
const NameToMapMsgTypesToTopicsToId () const
 A topic in the database is uniquely identified by a pair of (topic name, message type). This function allows you to find the id of a topic by searching (message type name -> topic name -> ID).
 
int64_t TopicId (const std::string &_topicName, const std::string &_msgType) const
 Convenience method to get an id given a topic name and type.
 
const NameToMapTopicsToMsgTypesToId () const
 A topic in the database is uniquely identified by a pair of (topic name, message type). This function allows you to find the id of a topic by searching (topic name -> message type name -> ID).
 

Detailed Description

The Descriptor class provides meta-information about what a log contains. This may be useful for determining QueryOptions or for generating a high-level overview of a Log's contents.

Member Typedef Documentation

◆ NameToId

using NameToId = std::map<std::string, int64_t>

A map from a name (e.g. topic name or message type name) to the id of a row in one of the database tables. (name -> id)

◆ NameToMap

A map from a name to a map from a name to a row ID. (name -> name -> id)

Constructor & Destructor Documentation

◆ ~Descriptor()

~Descriptor ( )

Destructor.

◆ Descriptor()

Descriptor ( Descriptor &&  _orig)

Move constructor, not used by most.

Member Function Documentation

◆ MsgTypesToTopicsToId()

const NameToMap & MsgTypesToTopicsToId ( ) const

A topic in the database is uniquely identified by a pair of (topic name, message type). This function allows you to find the id of a topic by searching (message type name -> topic name -> ID).

Returns
A map from message types to a map of topic names to row ids.
See also
TopicsToMsgTypesToId()

◆ TopicId()

int64_t TopicId ( const std::string _topicName,
const std::string _msgType 
) const

Convenience method to get an id given a topic name and type.

Parameters
[in]_topicNameName of the topic that you are interested in.
[in]_msgTypeName of the message type that you are interested in.
Returns
an id of a row in the topics table, or -1 none exists

◆ TopicsToMsgTypesToId()

const NameToMap & TopicsToMsgTypesToId ( ) const

A topic in the database is uniquely identified by a pair of (topic name, message type). This function allows you to find the id of a topic by searching (topic name -> message type name -> ID).

Returns
A map from topic names to a map of message types to row ids.
See also
MsgTypesToTopicsToId()

The documentation for this class was generated from the following file: