CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
cer_array.cc.h
Go to the documentation of this file.
1// -*- C++ -*-
12#ifndef __cxz_cereal_array_cc_h__
13#define __cxz_cereal_array_cc_h__
14
15#include "base/base.h"
16#include "array/marray.h"
17#include <cereal/cereal.hpp>
18
19namespace CNORXZ
20{
21 template <typename T>
22 template <class Archive>
23 void MArray<T>::save(Archive& ar, const std::uint32_t version) const
24 {
25 CXZ_ASSERT(version == 1u, "format version = " << version << " not supported");
26 ar(cereal::make_nvp("range", AB::mRange));
27 ar(cereal::make_nvp("data", mCont));
28 }
29
30 template <typename T>
31 template <class Archive>
32 void MArray<T>::load(Archive& ar, const std::uint32_t version)
33 {
34 CXZ_ASSERT(version == 1u, "format version = " << version << " not supported");
35 cer::save_load(ar, "range", AB::mRange);
36 ar(cereal::make_nvp("data", mCont));
37 }
38}
39
40#endif
#define CXZ_ASSERT(statement, errmsg)
Definition assert.h:40
basic headers
MArray declarations.
RangePtr save_load(Archive &ar, const String &name, RangePtr &r)
Sptr< Range > rangeCast(const RangePtr r)