16 #ifndef SERIALBOX_CORE_FRONTEND_GRIDTOOLS_FIELD_META_INFO_H 17 #define SERIALBOX_CORE_FRONTEND_GRIDTOOLS_FIELD_META_INFO_H 60 template <
class StorageType,
61 class =
typename std::enable_if<!std::is_same<typename std::decay<StorageType>::type,
66 field_meta_info_impl_ =
67 std::make_shared<FieldMetainfoImpl>(typeID, internal::get_dims(storage));
123 return field_meta_info(std::make_shared<FieldMetainfoImpl>(*field_meta_info_impl_));
127 explicit field_meta_info(
const std::shared_ptr<FieldMetainfoImpl>& field_meta_info_ptr) {
128 field_meta_info_impl_ = field_meta_info_ptr;
133 field_meta_info_impl_->swap(*other.field_meta_info_impl_);
138 return (*field_meta_info_impl_ == *right.field_meta_info_impl_);
146 type_id&
type() noexcept {
return field_meta_info_impl_->type(); }
147 const type_id&
type()
const noexcept {
return field_meta_info_impl_->type(); }
152 std::vector<int>&
dims() noexcept {
return field_meta_info_impl_->dims(); }
153 const std::vector<int>&
dims()
const noexcept {
return field_meta_info_impl_->dims(); }
163 return (stream << *f.field_meta_info_impl_);
167 const std::shared_ptr<FieldMetainfoImpl>&
impl()
const {
return field_meta_info_impl_; }
170 std::shared_ptr<FieldMetainfoImpl> field_meta_info_impl_;
Namespace of the serialbox library.
TypeID
Type-id of types recognized by serialbox.
Convert C++ type T to TypeID.