8 #ifndef NDFILEHDF5LAYOUT_H_
9 #define NDFILEHDF5LAYOUT_H_
159 { out << dset.
_str_();
return out; }
178 void _copy(
const Dataset& src);
183 size_t data_nelements;
184 size_t data_current_element;
185 size_t data_max_bytes;
186 size_t data_nelements_stored;
204 { out << hardLink.
_str_();
return out; }
248 { out << grp.
_str_();
return out; }
261 MapNDAttrSrc_t::const_iterator it_end,
262 std::set<std::string>& used_ndattribute_srcs);
265 void _copy(
const Group& src);
267 bool ndattr_default_container;
268 std::map<std::string, Dataset*> datasets;
269 std::map<std::string, Group*> groups;
270 std::map<std::string, HardLink*> hardlinks;
283 MapNDAttrSrc_t::const_iterator it_end,
284 std::set<std::string>& used_ndattribute_srcs);
Class used for writing an Attribute with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:88
DataSource source
Definition: NDFileHDF5Layout.h:102
bool is_onFileOpen()
Definition: NDFileHDF5Layout.cpp:54
~Attribute()
Definition: NDFileHDF5Layout.h:95
bool is_onFileClose()
Definition: NDFileHDF5Layout.cpp:60
void setOnFileOpen(bool onOpen)
Definition: NDFileHDF5Layout.cpp:49
Attribute()
Definition: NDFileHDF5Layout.h:90
std::string get_name()
Definition: NDFileHDF5Layout.cpp:44
Attribute & operator=(const Attribute &src)
Definition: NDFileHDF5Layout.cpp:38
Class used for writing a DataSource with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:50
~DataSource()
Definition: NDFileHDF5Layout.h:62
bool is_src_ndattribute()
Definition: NDFileHDF5Layout.cpp:121
std::string get_src_def()
Definition: NDFileHDF5Layout.cpp:131
size_t datatype_size()
Definition: NDFileHDF5Layout.cpp:141
void set_const_datatype_value(DataType_t dtype, const std::string &str_val)
Definition: NDFileHDF5Layout.cpp:172
void set_datatype(DataType_t type)
Definition: NDFileHDF5Layout.cpp:106
void set_when_to_save(When_t when)
Definition: NDFileHDF5Layout.cpp:179
DataType_t get_datatype()
return the string that define the source: either name of NDAttribute or constant value
Definition: NDFileHDF5Layout.cpp:136
When_t get_when_to_save()
Definition: NDFileHDF5Layout.cpp:184
bool is_src_constant()
Definition: NDFileHDF5Layout.cpp:111
DataSource & operator=(const DataSource &src)
Assignment operator Copies the sources private data members to this object.
Definition: NDFileHDF5Layout.cpp:97
bool is_src_detector()
Definition: NDFileHDF5Layout.cpp:116
DataSource()
Definition: NDFileHDF5Layout.cpp:73
bool is_src(DataSrc_t src)
Definition: NDFileHDF5Layout.cpp:126
Class used for writing a DataSet with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:149
void data_alloc_max_elements(size_t max_elements)
Definition: NDFileHDF5Layout.cpp:756
bool is_src_default()
Definition: NDFileHDF5Layout.cpp:826
Dataset & operator=(const Dataset &src)
Definition: NDFileHDF5Layout.cpp:701
void set_data_source(DataSource &src)
Return a string representation of the object.
Definition: NDFileHDF5Layout.cpp:739
std::string _str_()
Definition: NDFileHDF5Layout.cpp:711
void set_ndattr_name(const std::string &name)
Definition: NDFileHDF5Layout.cpp:831
friend std::ostream & operator<<(std::ostream &out, Dataset &dset)
Stream operator: use to prints a string representation of this class.
Definition: NDFileHDF5Layout.h:158
size_t data_num_elements()
Definition: NDFileHDF5Layout.cpp:786
void set_src_default(bool def)
Definition: NDFileHDF5Layout.cpp:821
Dataset()
Definition: NDFileHDF5Layout.cpp:679
DataSource & data_source()
Definition: NDFileHDF5Layout.cpp:751
size_t data_append_value(void *val)
Definition: NDFileHDF5Layout.cpp:765
size_t data_store_size()
Definition: NDFileHDF5Layout.cpp:791
const void * data()
Definition: NDFileHDF5Layout.cpp:804
virtual ~Dataset()
Definition: NDFileHDF5Layout.cpp:693
void data_stored()
Definition: NDFileHDF5Layout.cpp:796
bool has_ndattr_name(const std::string &name)
Definition: NDFileHDF5Layout.cpp:836
Describe a generic structure element with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:115
void _copy(const Element &src)
Definition: NDFileHDF5Layout.cpp:278
const std::string & get_name()
Definition: NDFileHDF5Layout.cpp:236
bool has_attribute(const std::string &attr_name)
Definition: NDFileHDF5Layout.cpp:261
Element()
Definition: NDFileHDF5Layout.cpp:190
std::map< std::string, Attribute > MapAttributes_t
Definition: NDFileHDF5Layout.h:130
Element * get_parent()
Definition: NDFileHDF5Layout.cpp:241
~Element()
Definition: NDFileHDF5Layout.h:120
int add_attribute(Attribute &attr)
Definition: NDFileHDF5Layout.cpp:251
std::string name
Definition: NDFileHDF5Layout.h:136
virtual std::string get_path(bool trailing_slash=false)
Definition: NDFileHDF5Layout.cpp:214
virtual std::string get_full_name()
Definition: NDFileHDF5Layout.cpp:207
MapAttributes_t attributes
Definition: NDFileHDF5Layout.h:135
int tree_level()
Definition: NDFileHDF5Layout.cpp:266
MapAttributes_t & get_attributes()
Definition: NDFileHDF5Layout.cpp:246
Element & operator=(const Element &src)
Definition: NDFileHDF5Layout.cpp:226
Describe a group element.
Definition: NDFileHDF5Layout.h:221
std::string _str_()
Definition: NDFileHDF5Layout.cpp:530
int num_datasets()
Definition: NDFileHDF5Layout.cpp:520
Group & operator=(const Group &src)
Definition: NDFileHDF5Layout.cpp:319
std::map< std::string, DataSource * > MapNDAttrSrc_t
return a map of datasets [string name, Dataset dset] which contains all datasets, marked as [source] ...
Definition: NDFileHDF5Layout.h:259
void set_default_ndattr_group()
Definition: NDFileHDF5Layout.cpp:497
Dataset * new_dset(const std::string &name)
Definition: NDFileHDF5Layout.cpp:329
MapGroups_t & get_groups()
Definition: NDFileHDF5Layout.cpp:554
virtual ~Group()
Definition: NDFileHDF5Layout.cpp:310
Group()
Definition: NDFileHDF5Layout.cpp:287
std::map< std::string, Dataset * > MapDatasets_t
Definition: NDFileHDF5Layout.h:252
MapHardLinks_t & get_hardlinks()
Definition: NDFileHDF5Layout.cpp:559
void find_dsets(DataSrc_t source, MapDatasets_t &dsets)
Definition: NDFileHDF5Layout.cpp:564
int find_detector_default_dset(Dataset **dset)
<< search through subgroups to return a pointer to the NDAttribute default container group
Definition: NDFileHDF5Layout.cpp:451
MapDatasets_t & get_datasets()
Definition: NDFileHDF5Layout.cpp:549
int find_dset_ndattr(const std::string &ndattr_name, Dataset **dset)
Definition: NDFileHDF5Layout.cpp:430
int num_groups()
Definition: NDFileHDF5Layout.cpp:525
HardLink * new_hardlink(const std::string &name)
Create a new HardLink, insert it into the group list, set the full path name, and finally return a po...
Definition: NDFileHDF5Layout.cpp:396
std::map< std::string, Group * > MapGroups_t
Return a string representation of the object.
Definition: NDFileHDF5Layout.h:251
Group * find_ndattr_default_group()
Definition: NDFileHDF5Layout.cpp:502
virtual void merge_ndattributes(MapNDAttrSrc_t::const_iterator it_begin, MapNDAttrSrc_t::const_iterator it_end, std::set< std::string > &used_ndattribute_srcs)
Definition: NDFileHDF5Layout.cpp:583
std::map< std::string, HardLink * > MapHardLinks_t
Definition: NDFileHDF5Layout.h:253
Group * new_group(const std::string &name)
Create a new group, insert it into the group list, set the full path name, and finally return a point...
Definition: NDFileHDF5Layout.cpp:363
int find_dset(std::string &dsetname, Dataset **dest)
Definition: NDFileHDF5Layout.cpp:477
friend std::ostream & operator<<(std::ostream &out, Group &grp)
Stream operator: use to prints a string representation of this class.
Definition: NDFileHDF5Layout.h:247
Class used for writing a HardLink with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:194
std::string _str_()
Definition: NDFileHDF5Layout.cpp:882
HardLink & operator=(const HardLink &src)
Definition: NDFileHDF5Layout.cpp:872
std::string & get_target()
Definition: NDFileHDF5Layout.cpp:896
HardLink()
Definition: NDFileHDF5Layout.cpp:860
void set_target(const std::string &target)
Return a string representation of the object.
Definition: NDFileHDF5Layout.cpp:891
friend std::ostream & operator<<(std::ostream &out, HardLink &hardLink)
Stream operator: use to prints a string representation of this class.
Definition: NDFileHDF5Layout.h:203
virtual ~HardLink()
Definition: NDFileHDF5Layout.cpp:868
Class used for writing the root of the file with the NDFileHDF5 plugin.
Definition: NDFileHDF5Layout.h:276
virtual void merge_ndattributes(MapNDAttrSrc_t::const_iterator it_begin, MapNDAttrSrc_t::const_iterator it_end, std::set< std::string > &used_ndattribute_srcs)
Definition: NDFileHDF5Layout.cpp:639
std::string get_path(bool trailing_slash=false)
Definition: NDFileHDF5Layout.h:286
Root()
Definition: NDFileHDF5Layout.cpp:627
virtual ~Root()
Definition: NDFileHDF5Layout.h:281
std::string get_full_name()
Definition: NDFileHDF5Layout.h:285
Definition: NDFileHDF5Layout.cpp:17
DataSrc_t
Definition: NDFileHDF5Layout.h:26
@ constant
Definition: NDFileHDF5Layout.h:30
@ notset
Definition: NDFileHDF5Layout.h:27
@ ndattribute
Definition: NDFileHDF5Layout.h:29
@ detector
Definition: NDFileHDF5Layout.h:28
When_t
Definition: NDFileHDF5Layout.h:20
@ OnFrame
Definition: NDFileHDF5Layout.h:21
@ OnFileClose
Definition: NDFileHDF5Layout.h:23
@ OnFileOpen
Definition: NDFileHDF5Layout.h:22
DataType_t
Definition: NDFileHDF5Layout.h:33
@ int8
Definition: NDFileHDF5Layout.h:34
@ int64
Definition: NDFileHDF5Layout.h:40
@ int16
Definition: NDFileHDF5Layout.h:36
@ uint8
Definition: NDFileHDF5Layout.h:35
@ float32
Definition: NDFileHDF5Layout.h:42
@ uint32
Definition: NDFileHDF5Layout.h:39
@ uint64
Definition: NDFileHDF5Layout.h:41
@ uint16
Definition: NDFileHDF5Layout.h:37
@ string
Definition: NDFileHDF5Layout.h:44
@ float64
Definition: NDFileHDF5Layout.h:43
@ int32
Definition: NDFileHDF5Layout.h:38