FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
HDF5Attributes.hpp
1#ifndef __HD5F5Attributes_hpp
2#define __HD5F5Attributes_hpp
3
4#include <unordered_set>
5
6#include "HDF5Saver.hpp"
7
8#include "field/FiberType.hpp"
9#include <memcore/Attributes.hpp>
10#include "F5/F5defs.h"
11#include "F5/F5A.h"
12
13#include "FiberIOHDF5DllApi.h"
14
15
16namespace Fiber
17{
18
19namespace FiberIO
20{
21
22namespace HDF5
23{
24
25using AttributeSet_t = std::unordered_set<string>;
26
27
33template <>
35{
36 hid_t m_location; // the hdf5-id where the attribute shall be stored, e.g. a field id, a fragment id, ...
37
43
44#if 0
45// class HDF5TypeFromTypeID : public TypeAction::Iterator
46 {
47 const type_info& m_t_info;
49
50 public:
53 , m_hdf5_type( -1 )
54 {}
55
56 hid_t getID() { return m_hdf5_type; }
57
58// bool considerType(const MemCore::TypeInfo&ElementType) override;
59
61 const MemCore::RefPtr<TypeAction>&TA) override;
62 };
63#endif
64
65public:
66 AttributeSet_t DontSaveAttributeSet;
67
69 : m_location( location )
70 , OverrideAttributes( theOverrideAttributes )
71 , DontSaveAttributeSet( theDontSaveAttributeSet )
72 {}
73
77static std::string encodeF5( const std::string& vish_name );
78
82static std::string decodeF5( const std::string& f5_name );
83
87// bool apply( const std::string& attribute_name, const MemCore::RefPtr<MemCore::ChunkBase>& chunk ) override;
88
93 std::string toString() const;
94
95 bool saveAttribute( const std::string& attribute_name, const MemCore::RefPtr<MemCore::ChunkBase>&chunk ) const;
96 int save(const MemCore::Attributes&, hid_t location );
97};
98
99}}}
100
101namespace std
102{
107} /* namespace std */
108
109
110
111#endif
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp __func(_Tp)) const
basic_string< char > string
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::string to_string(const span< char > &s)
STL namespace.
const Attributes & OverrideAttributes
Allow to override the value of certain attributes when saving.
Definition HDF5Attributes.hpp:42
Definition HDF5Saver.hpp:24