Implement input validation

This commit is contained in:
2018-11-20 14:28:47 +01:00
parent 554734659a
commit f78c7a2a21
2 changed files with 52 additions and 16 deletions
+5 -6
View File
@@ -6,20 +6,19 @@
#include "ZmqReceiver.hpp"
class MetadataBuffer
{
const uint64_t n_images;
const std::shared_ptr<std::unordered_map<std::string, HeaderDataType>> header_values_type;
protected:
std::unordered_map<std::string, std::shared_ptr<char>> metadata_buffer;
std::unordered_map<std::string, size_t> metadata_length_bytes;
std::unordered_map<std::string, std::shared_ptr<char>> metadata_buffer;
std::unordered_map<std::string, size_t> metadata_length_bytes;
public:
MetadataBuffer(uint64_t n_images, std::shared_ptr<std::unordered_map<std::string, HeaderDataType>> header_values_type);
void add_metadata_to_buffer(std::string name, uint64_t frame_index, const char* data);
std::shared_ptr<char> get_metadata_values(std::string name);
MetadataBuffer(uint64_t n_images, std::shared_ptr<std::unordered_map<std::string, HeaderDataType>> header_values_type);
void add_metadata_to_buffer(std::string name, uint64_t frame_index, const char* data);
std::shared_ptr<char> get_metadata_values(std::string name);
};
#endif