All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Static Public Member Functions | List of all members
gazebo::msgs::MsgFactory Class Reference

A factory that generates protobuf message based on a string type. More...

#include <msgs/msgs.hh>

Static Public Member Functions

static void GetMsgTypes (std::vector< std::string > &_types)
 Get all the message types. More...
 
static boost::shared_ptr
< google::protobuf::Message > 
NewMsg (const std::string &_msgType)
 Create a new instance of a message. More...
 
static void RegisterMsg (const std::string &_msgType, MsgFactoryFn _factoryfn)
 Register a message. More...
 

Detailed Description

A factory that generates protobuf message based on a string type.

Member Function Documentation

static void gazebo::msgs::MsgFactory::GetMsgTypes ( std::vector< std::string > &  _types)
static

Get all the message types.

Parameters
[out]_typesVector of strings of the message types.
static boost::shared_ptr<google::protobuf::Message> gazebo::msgs::MsgFactory::NewMsg ( const std::string &  _msgType)
static

Create a new instance of a message.

Parameters
[in]_msgTypeType of message to create.
Returns
Pointer to a google protobuf message. Null if the message type could not be handled.
static void gazebo::msgs::MsgFactory::RegisterMsg ( const std::string &  _msgType,
MsgFactoryFn  _factoryfn 
)
static

Register a message.

Parameters
[in]_msgTypeType of message to register.
[in]_factoryfnFunction that generates the message.

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