Factory.hh
Go to the documentation of this file.
A factory that generates protobuf message based on a string type. This class will also try to load al...
Definition: Factory.hh:53
static std::unique_ptr< T > New(const std::string &_msgType, const std::string &_args)
Create a new instance of a message.
Definition: Factory.hh:77
static std::unique_ptr< google::protobuf::Message > New(const std::string &_msgType, const std::string &_args)
Create a new instance of a message.
static std::unique_ptr< T > New(const std::string &_msgType)
Create a new instance of a message.
Definition: Factory.hh:65
static void Register(const std::string &_msgType, FactoryFn _factoryfn)
Register a message.
static void LoadDescriptors(const std::string &_paths)
Load a collection of descriptor .desc files.
static void Types(std::vector< std::string > &_types)
Get all the message types.
static std::unique_ptr< google::protobuf::Message > New(const std::string &_msgType)
Create a new instance of a message.
std::unique_ptr< google::protobuf::Message >(* FactoryFn)()
Prototype for message factory generation.
Definition: Factory.hh:46