MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / Serializable

Class Serializable

include/Suscan/Serializable.h:26–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25namespace Suscan {
26 class Serializable {
27 Object storage;
28
29 public:
30 void
31 putStorage(Object &&obj)
32 {
33 this->storage = std::move(obj);
34 }
35
36 Object &&
37 takeStorage(void)
38 {
39 return std::move(this->storage);
40 }
41
42 Object &&
43 persist(Object &obj)
44 {
45 this->putStorage(std::move(obj));
46 return this->takeStorage();
47 }
48
49 virtual void deserialize(Object const &conf) = 0;
50 virtual Object &&serialize(void) = 0;
51 virtual ~Serializable();
52 };
53}
54
55#endif // SERIALIZABLE_H

Callers

nothing calls this directly

Calls 1

putStorageMethod · 0.95

Tested by

no test coverage detected