diff options
Diffstat (limited to 'modules/codec-obj/c++')
-rw-r--r-- | modules/codec-obj/c++/SConscript | 38 | ||||
-rw-r--r-- | modules/codec-obj/c++/obj.hpp | 31 |
2 files changed, 69 insertions, 0 deletions
diff --git a/modules/codec-obj/c++/SConscript b/modules/codec-obj/c++/SConscript new file mode 100644 index 0000000..1b93e07 --- /dev/null +++ b/modules/codec-obj/c++/SConscript @@ -0,0 +1,38 @@ +#!/bin/false + +import os +import os.path +import glob + + +Import('env') + +dir_path = Dir('.').abspath + +# Environment for base library +codec_json_env = env.Clone(); + +codec_json_env.sources = sorted(glob.glob(dir_path + "/*.cpp")) +codec_json_env.headers = sorted(glob.glob(dir_path + "/*.hpp")) + +env.sources += codec_json_env.sources; +env.headers += codec_json_env.headers; + +## Shared lib +objects_shared = [] +codec_json_env.add_source_files(objects_shared, codec_json_env.sources, shared=True); +env.library_shared = codec_json_env.SharedLibrary('#build/forstio-codec-json', [objects_shared]); + +## Static lib +objects_static = [] +codec_json_env.add_source_files(objects_static, codec_json_env.sources, shared=False); +env.library_static = codec_json_env.StaticLibrary('#build/forstio-codec-json', [objects_static]); + +# Set Alias +env.Alias('library_codec_json', [env.library_shared, env.library_static]); + +env.targets += ['library_codec_json']; + +# Install +env.Install('$prefix/lib/', [env.library_shared, env.library_static]); +env.Install('$prefix/include/forstio/codec/json/', [codec_json_env.headers]); diff --git a/modules/codec-obj/c++/obj.hpp b/modules/codec-obj/c++/obj.hpp new file mode 100644 index 0000000..d8d0dde --- /dev/null +++ b/modules/codec-obj/c++/obj.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <forstio/codec/data.hpp> + +namespace saw { +namespace encode { +struct WavefrontObj {}; +} +} + +namespace saw{ +template<typename Schema> +class data<Schema, encode::WavefrontObj> { +private: +public: +}; + +template<typename Schema> +class codec<Schema, encode::WavefrontObj> { +private: + template<typename ToEncode> + error_or<void> decode(data<Schema,encode::WavefrontObj>& from, data<Schema, ToEncode>& to){ + return make_error<err::not_implemented>("Wavefront decode not available"); + } + + template<typename FromEncode> + error_or<void> encode(data<Schema,FromEncode>& from, data<Schema, encode::WavefrontObj>& to){ + return make_error<err::not_implemented>("Wavefront encode not available"); + } +}; +} |