13#include <google/protobuf/descriptor.pb.h>
14#include <google/protobuf/descriptor_database.h>
15#include <google/protobuf/dynamic_message.h>
38 bool Add(std::string_view filename, std::span<const uint8_t> data);
46 google::protobuf::Message*
Find(std::string_view name)
const;
54 return m_factory.get();
59 std::unique_ptr<google::protobuf::FileDescriptorProto> proto;
60 std::vector<std::string> uses;
61 bool complete =
false;
65 void Build(std::string_view filename, ProtoFile& file);
66 bool Rebuild(ProtoFile& file);
68 std::unique_ptr<google::protobuf::DescriptorPool> m_pool =
69 std::make_unique<google::protobuf::DescriptorPool>();
70 std::unique_ptr<google::protobuf::DynamicMessageFactory> m_factory =
71 std::make_unique<google::protobuf::DynamicMessageFactory>();
Database of protobuf dynamic messages.
Definition ProtobufMessageDatabase.h:26
google::protobuf::MessageFactory * GetMessageFactory()
Gets message factory.
Definition ProtobufMessageDatabase.h:53
bool Add(std::string_view filename, std::span< const uint8_t > data)
Adds a file descriptor to the database.
google::protobuf::Message * Find(std::string_view name) const
Finds a message in the database by name.
StringMap is a sorted associative container that contains key-value pairs with unique string keys.
Definition StringMap.h:26
Foonathan namespace.
Definition ntcore_cpp.h:26