coral
A C++ library for distributed co-simulation
protobuf.hpp
Go to the documentation of this file.
1 
10 #ifndef CORAL_PROTOBUF_HPP
11 #define CORAL_PROTOBUF_HPP
12 
13 #include <stdexcept>
14 #include "google/protobuf/message_lite.h"
15 #include "zmq.hpp"
16 
17 
18 namespace coral
19 {
20 
22 namespace protobuf
23 {
24 
25 
33 void SerializeToFrame(
34  const google::protobuf::MessageLite& source,
35  zmq::message_t& target);
36 
37 
42 void ParseFromFrame(
43  const zmq::message_t& source,
44  google::protobuf::MessageLite& target);
45 
46 
49 {
50 public:
51  explicit SerializationException(const std::string& msg);
52 };
53 
54 
55 }} // namespace
56 #endif // header guard
STL class.
void SerializeToFrame(const google::protobuf::MessageLite &source, zmq::message_t &target)
Serializes a Protobuf message into a ZMQ message.
Definition: variable_io.hpp:28
Exception that signals failure to serialize or deserialize a message.
Definition: protobuf.hpp:48
void ParseFromFrame(const zmq::message_t &source, google::protobuf::MessageLite &target)
Deserializes a Protobuf message from a ZMQ message.