A factory that generates protobuf message based on a string type. This class will also try to load all Protobuf descriptors specified in the IGN_DESCRIPTOR_PATH environment variable on program start.
More...
#include <ignition/msgs.hh>
A factory that generates protobuf message based on a string type. This class will also try to load all Protobuf descriptors specified in the IGN_DESCRIPTOR_PATH environment variable on program start.
◆ LoadDescriptors()
static void LoadDescriptors |
( |
const std::string & |
_paths | ) |
|
|
static |
Load a collection of descriptor .desc files.
- Parameters
-
[in] | _paths | A set of directories containing .desc decriptor files. Each directory should be separated by ":". |
◆ New() [1/4]
Create a new instance of a message.
- Parameters
-
[in] | _msgType | Type of message to create. |
- Returns
- Pointer to a google protobuf message. Null if the message type could not be handled.
Referenced by Factory::New().
◆ New() [2/4]
Create a new instance of a message.
- Parameters
-
[in] | _msgType | Type of message to create. |
- Returns
- Pointer to a google protobuf message. Null if the message type could not be handled.
◆ New() [3/4]
Create a new instance of a message.
- Parameters
-
[in] | _msgType | Type of message to create. |
[in] | _args | Message arguments. This will populate the message. |
- Returns
- Pointer to a google protobuf message. Null if the message type could not be handled.
References Factory::New().
◆ New() [4/4]
Create a new instance of a message.
- Parameters
-
[in] | _msgType | Type of message to create. |
[in] | _args | Message arguments. This will populate the message. |
- Returns
- Pointer to a google protobuf message. Null if the message type could not be handled.
◆ Register()
Register a message.
- Parameters
-
[in] | _msgType | Type of message to register. |
[in] | _factoryfn | Function that generates the message. |
◆ Types()
Get all the message types.
- Parameters
-
[out] | _types | Vector of strings of the message types. |
The documentation for this class was generated from the following file: