summaryrefslogtreecommitdiff
path: root/modules/codec/c++/data.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec/c++/data.hpp')
-rw-r--r--modules/codec/c++/data.hpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp
index 8e92622..1cd474c 100644
--- a/modules/codec/c++/data.hpp
+++ b/modules/codec/c++/data.hpp
@@ -90,12 +90,35 @@ private:
};
template<>
-class data<schema::Void> {
+class data<schema::Void, encode::Native> {
public:
using Schema = schema::Void;
using MetaSchema = schema::Void;
};
+template<>
+class data<schema::Bool, encode::Native> {
+public:
+ using Schema = schema::Bool;
+ using MetaSchema = schema::Void;
+private:
+ bool value_;
+public:
+ data():value_{false}{}
+ data(data<MetaSchema, encode::Native>):value_{false}{}
+
+ SAW_DEFAULT_COPY(data);
+ SAW_DEFAULT_MOVE(data);
+
+ void set(bool val){
+ value_ = val;
+ }
+
+ bool get() const {
+ return value_;
+ }
+};
+
template<typename T, size_t N, typename Storage>
class data<schema::Primitive<T,N>, encode::Native, Storage> {
public: