HOPS
HOPS class reference
MHO_ContainerFileInterface.hh
Go to the documentation of this file.
1 #ifndef MHO_ContainerFileInterface_HH__
2 #define MHO_ContainerFileInterface_HH__
3 
6 #include "MHO_Message.hh"
7 
9 #include "MHO_ContainerStore.hh"
10 
11 namespace hops
12 {
13 
26 {
27  public:
30 
36  void SetFilename(std::string filename);
37 
38 
46  void SetIndexFileName(std::string index_filename);
47 
48 
57  void PopulateStoreFromFile(MHO_ContainerStore& store, bool do_clear_store = false);
58 
65 
73  void ConvertStoreToJSON(MHO_ContainerStore& store, mho_json& json_obj, int level_of_detail = eJSONBasic);
74 
83  void ConvertObjectInStoreToJSON(MHO_ContainerStore& store, const MHO_UUID& obj_uuid, mho_json& json_obj,
84  int level_of_detail = eJSONBasic);
85 
86  //also provides access to the raw bytes of table container data (for hops2flat)
100  const MHO_UUID& obj_uuid,
101  mho_json& json_obj,
102  std::size_t& rank,
103  const char*& raw_data,
104  std::size_t& raw_data_byte_size,
105  std::string& raw_data_descriptor,
106  int level_of_detail = eJSONBasic);
107 
108 
109  private:
110  std::string fFilename;
111  std::string fIndexFilename;
112  MHO_BinaryFileInterface fFileInterface;
113 };
114 
115 } // namespace hops
116 
117 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_BinaryFileInterface.
Definition: MHO_BinaryFileInterface.hh:27
Class MHO_ContainerDictionary.
Definition: MHO_ContainerDictionary.hh:28
Class MHO_ContainerFileInterface - a MHO_ContainerDictionary which can read/write objects to file.
Definition: MHO_ContainerFileInterface.hh:26
void SetFilename(std::string filename)
Setter for filename.
Definition: MHO_ContainerFileInterface.cc:11
void ConvertObjectInStoreToJSONAndRaw(MHO_ContainerStore &store, const MHO_UUID &obj_uuid, mho_json &json_obj, std::size_t &rank, const char *&raw_data, std::size_t &raw_data_byte_size, std::string &raw_data_descriptor, int level_of_detail=eJSONBasic)
Converts an object in store to JSON and raw data, providing access to raw bytes for hops2flat.
Definition: MHO_ContainerFileInterface.cc:203
virtual ~MHO_ContainerFileInterface()
Definition: MHO_ContainerFileInterface.cc:9
MHO_ContainerFileInterface()
Definition: MHO_ContainerFileInterface.cc:6
void SetIndexFileName(std::string index_filename)
Setter for index file name.
Definition: MHO_ContainerFileInterface.cc:16
void ConvertObjectInStoreToJSON(MHO_ContainerStore &store, const MHO_UUID &obj_uuid, mho_json &json_obj, int level_of_detail=eJSONBasic)
Converts a specific object in store to JSON representation at given detail level.
Definition: MHO_ContainerFileInterface.cc:170
void ConvertStoreToJSON(MHO_ContainerStore &store, mho_json &json_obj, int level_of_detail=eJSONBasic)
Converts a container store to JSON representation with specified detail level.
Definition: MHO_ContainerFileInterface.cc:141
void PopulateStoreFromFile(MHO_ContainerStore &store, bool do_clear_store=false)
Populates a store from a file, optionally clearing it first.
Definition: MHO_ContainerFileInterface.cc:21
void WriteStoreToFile(MHO_ContainerStore &store)
Writes object in a MHO_ContainerStore to file using MHO_BinaryFileInterface and factory map.
Definition: MHO_ContainerFileInterface.cc:91
Class MHO_ContainerStore.
Definition: MHO_ContainerStore.hh:32
Class MHO_UUID - a class for a 16 byte UUID (for object and type identification)
Definition: MHO_UUID.hh:27
Definition: MHO_ChannelLabeler.hh:17
Definition: type_110.h:12