]> git.sesse.net Git - nageru/blob - shared/text_proto.h
Move protobuf text serialization into a shared file.
[nageru] / shared / text_proto.h
1 #ifndef _TEXT_PROTO_H
2 #define _TEXT_PROTO_H 1
3
4 // Utility functions to serialize protobufs on disk.
5 // We use the text format because it's friendlier
6 // for a user to look at and edit.
7
8 #include <string>
9
10 namespace google {
11 namespace protobuf {
12 class Message;
13 }  // namespace protobuf
14 }  // namespace google
15
16 bool load_proto_from_file(const std::string &filename, google::protobuf::Message *msg);
17 bool save_proto_to_file(const google::protobuf::Message &msg, const std::string &filename);
18
19 #endif  // !defined(_TEXT_PROTO_H)