h5cpp
0.5.0
A modern C++ wrapper for the HDF5 C library
|
Go to the documentation of this file.
36 template<
typename CharT>
41 using std::vector<CharT>::vector;
103 auto buffer_iter = buffer.begin();
104 auto buffer_end = buffer.end();
105 auto data_iter = data.begin();
106 auto data_end = data.end();
108 for(;buffer_iter!=buffer_end && data_iter != data_end; ++buffer_iter,++data_iter)
109 *buffer_iter = *data_iter;
123 return DataType(buffer.begin(),buffer.end());
139 auto iter = buffer.begin();
140 for(
const auto &str: data)
143 std::advance(iter,unsigned2signed<ssize_t>(memory_type.
size()));
155 auto start=buffer.begin();
156 while(start!=buffer.end())
158 auto end = start+unsigned2signed<std::string::difference_type>(memory_type.
size());
159 data.push_back(std::string(start,end));
size_t size() const override
get current size of the string type
size_t size() const
return the number of elements in the current selection
SelectionManager selection
access to selection manager
Definition: dataspace.hpp:144
static DataType from_buffer(const BufferType &, const datatype::String &, const dataspace::Dataspace &)
Definition: fixed_length_string.hpp:74
T DataType
Definition: fixed_length_string.hpp:59
void copy(const Node &source, const Group &base, const Path &relative_path, const property::ObjectCopyList &ocpl=property::ObjectCopyList(), const property::LinkCreationList &lcpl=property::LinkCreationList())
copy node object
static BufferType to_buffer(const DataType &, const datatype::String &, const dataspace::Dataspace &)
Definition: fixed_length_string.hpp:68
static DataType from_buffer(const BufferType &buffer, const datatype::String &memory_type, const dataspace::Dataspace &)
Definition: fixed_length_string.hpp:149
std::string DataType
Definition: fixed_length_string.hpp:84
static DataType from_buffer(const BufferType &buffer, const datatype::String &, const dataspace::Dataspace &)
store data from buffer in target memory
Definition: fixed_length_string.hpp:119
static FixedLengthStringBuffer< CharT > create(const datatype::String &datatype, const dataspace::Dataspace &dataspace)
Definition: fixed_length_string.hpp:43
static BufferType to_buffer(const DataType &data, const datatype::String &memory_type, const dataspace::Dataspace &memory_space)
Definition: fixed_length_string.hpp:133
Definition: fixed_length_string.hpp:57
Definition: fixed_length_string.hpp:37
string datatype
Definition: string.hpp:39
std::vector< std::string > DataType
Definition: fixed_length_string.hpp:130
SelectionType type() const
get the type of the current selection
dataspace base class
Definition: dataspace.hpp:41
virtual hssize_t size() const
number of elements in the dataspace
static BufferType to_buffer(const DataType &data, const datatype::String &memory_type, const dataspace::Dataspace &memory_space)
create fixed length string buffer from data
Definition: fixed_length_string.hpp:97
FixedLengthStringBuffer< char > BufferType
Definition: fixed_length_string.hpp:60
top-level namespace of the entire library
Definition: attribute.hpp:45
static BufferType create_buffer(const datatype::String &datatype, const dataspace::Dataspace &dataspace)
Definition: fixed_length_string.hpp:62