#ifndef PROTOIMPORTER_H_ #define PROTOIMPORTER_H_ #include "Singleton.h" #include #include #include class ProtoImporter { public: ProtoImporter(); public: void MapPath(const std::string& virtual_path, const std::string& disk_path); bool Import(const std::string& filename); bool Import(const std::string&filename,const void * data, int size); void CleanCacheFile(); void CleanMapPath(); google::protobuf::Message* createDynamicMessage(const std::string& typeName); public: google::protobuf::compiler::Importer importer; google::protobuf::DynamicMessageFactory factory; }; #define sProtoImporter Singleton::instance() #endif