Add mapping logic and serialization for writing
This commit is contained in:
22
app/include/Serializer.h
Normal file
22
app/include/Serializer.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef SERIALIZER_H_
|
||||
#define SERIALIZER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <fan/Fan.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
class Serializer {
|
||||
public:
|
||||
Serializer();
|
||||
void Serialize(std::vector<std::shared_ptr<Fan>> fans);
|
||||
|
||||
private:
|
||||
void WriteJson(json o);
|
||||
};
|
||||
|
||||
#endif // SERIALIZER_H_
|
||||
Reference in New Issue
Block a user