|
| pages (std::ostream &a_out, hid_t a_group, const std::string &a_name, const std::string &a_form, bool a_write, unsigned int a_compress) |
|
virtual | ~pages () |
|
bool | is_valid () const |
|
const std::string & | name () const |
|
const std::string & | form () const |
|
tools::uint64 | entries () const |
|
tools::uint64 | pos () const |
|
void | reset_pos () |
|
template<class TYPE > |
bool | write_page (size_t a_size, const TYPE *a_array) |
|
template<class TYPE > |
bool | read_page (size_t a_size, TYPE *a_array) |
|
template<class TYPE > |
bool | write_vlen (size_t a_size, const TYPE *a_array) |
|
template<class TYPE > |
bool | read_vlen (size_t &a_size, TYPE *&a_array) |
|
bool | write_string (const std::string &a_string) |
|
bool | read_string (std::string &a_string) |
|
Definition at line 27 of file pages.
◆ pages() [1/2]
tools::hdf5::pages::pages |
( |
std::ostream & |
a_out, |
|
|
hid_t |
a_group, |
|
|
const std::string & |
a_name, |
|
|
const std::string & |
a_form, |
|
|
bool |
a_write, |
|
|
unsigned int |
a_compress |
|
) |
| |
|
inline |
Definition at line 30 of file pages.
37 tools::mem::increment(s_class().c_str());
42 m_out <<
"pages::pages : can't create group for column " <<
m_name <<
"." << std::endl;
47 m_out <<
"pages::pages : write_atb(class) failed." << std::endl;
53 if (!write_scalar_atb<int>(
m_group,
"version",v)) {
54 m_out <<
"pages::pages : write_scalar_atb(version) failed." << std::endl;
62 m_out <<
"pages::pages : can't open group for column " <<
m_name <<
"." << std::endl;
67 m_out <<
"pages::pages : read_scalar(entries) failed." << std::endl;
◆ ~pages()
virtual tools::hdf5::pages::~pages |
( |
| ) |
|
|
inlinevirtual |
Definition at line 74 of file pages.
77 m_out <<
"pages::~pages : write_scalar(entries) failed." << std::endl;
83 tools::mem::decrement(s_class().c_str());
◆ pages() [2/2]
tools::hdf5::pages::pages |
( |
const pages & |
a_from | ) |
|
|
inlineprotected |
Definition at line 87 of file pages.
89 tools::mem::increment(s_class().c_str());
◆ entries()
◆ form()
const std::string& tools::hdf5::pages::form |
( |
| ) |
const |
|
inline |
Definition at line 97 of file pages.
◆ is_valid()
bool tools::hdf5::pages::is_valid |
( |
| ) |
const |
|
inline |
Definition at line 94 of file pages.
◆ name()
const std::string& tools::hdf5::pages::name |
( |
| ) |
const |
|
inline |
Definition at line 96 of file pages.
◆ operator=()
pages& tools::hdf5::pages::operator= |
( |
const pages & |
| ) |
|
|
inlineprotected |
Definition at line 92 of file pages.
◆ pos()
◆ read_page()
template<class TYPE >
bool tools::hdf5::pages::read_page |
( |
size_t |
a_size, |
|
|
TYPE * |
a_array |
|
) |
| |
|
inline |
Definition at line 128 of file pages.
130 unsigned int _size = a_size;
133 if(!read_sub_array<TYPE>(
m_group,s_pages(),(
unsigned int)
m_pos,(
unsigned int)_size,n,array)) {
134 m_out <<
"pages::read_page : read_sub_array<TYPE>() failed." << std::endl;
138 m_out <<
"pages::read_page : size mismatch. Requested " << _size <<
", got "<< n <<
"." << std::endl;
143 {TYPE* rpos = (TYPE*)array;
144 TYPE* wpos = (TYPE*)a_array;
145 for(
size_t i=0;i<n;i++,rpos++,wpos++) *wpos = *rpos;
146 for(
size_t i=n;i<_size;i++,rpos++,wpos++) *wpos = TYPE();}
◆ read_string()
bool tools::hdf5::pages::read_string |
( |
std::string & |
a_string | ) |
|
|
inline |
Definition at line 215 of file pages.
217 m_out <<
"pages::read_string : read_sub_string() failed." << std::endl;
◆ read_vlen()
template<class TYPE >
bool tools::hdf5::pages::read_vlen |
( |
size_t & |
a_size, |
|
|
TYPE *& |
a_array |
|
) |
| |
|
inline |
Definition at line 178 of file pages.
181 if(!read_sub_vlen<TYPE>(
m_group,s_pages(),(
unsigned int)
m_pos,sz,a_array)) {
182 m_out <<
"pages::read_vlen : read_sub_vlen<TYPE>() failed." << std::endl;
◆ reset_pos()
void tools::hdf5::pages::reset_pos |
( |
| ) |
|
|
inline |
◆ write_page()
template<class TYPE >
bool tools::hdf5::pages::write_page |
( |
size_t |
a_size, |
|
|
const TYPE * |
a_array |
|
) |
| |
|
inline |
Definition at line 105 of file pages.
107 if(!write_array<TYPE>(
m_group,s_pages(),a_size,a_array,a_size?a_size:32,
m_compress)) {
108 m_out <<
"pages::write_page : write_array<TYPE>() failed. Pos " <<
m_pos << std::endl;
113 m_out <<
"pages::write_page : H5Dopen failed. Pos " <<
m_pos << std::endl;
117 if(!write_append_array_dataset<TYPE>(
m_dataset,a_size,a_array)) {
118 m_out <<
"pages::write_page : write_append_array_dataset<TYPE>() failed. Pos " <<
m_pos << std::endl;
◆ write_string()
bool tools::hdf5::pages::write_string |
( |
const std::string & |
a_string | ) |
|
|
inline |
Definition at line 193 of file pages.
196 m_out <<
"pages::write_string : hdf5::write_string() failed. Pos " <<
m_pos << std::endl;
201 m_out <<
"pages::write_string : H5Dopen failed. Pos " <<
m_pos << std::endl;
206 m_out <<
"pages::write_string : write_append_string_dataset() failed. Pos " <<
m_pos << std::endl;
◆ write_vlen()
template<class TYPE >
bool tools::hdf5::pages::write_vlen |
( |
size_t |
a_size, |
|
|
const TYPE * |
a_array |
|
) |
| |
|
inline |
Definition at line 155 of file pages.
157 if(!hdf5::write_vlen<TYPE>(
m_group,s_pages(),a_size,a_array,a_size?a_size:32,
m_compress)) {
158 m_out <<
"pages::write_vlen : write_vlen<TYPE>() failed. Pos " <<
m_pos << std::endl;
163 m_out <<
"pages::write_vlen : H5Dopen failed. Pos " <<
m_pos << std::endl;
167 if(!write_append_vlen_dataset<TYPE>(
m_dataset,a_size,a_array)) {
168 m_out <<
"pages::write_vlen : write_append_vlen_dataset<TYPE>() failed. Pos " <<
m_pos << std::endl;
◆ m_compress
unsigned int tools::hdf5::pages::m_compress |
|
protected |
◆ m_dataset
hid_t tools::hdf5::pages::m_dataset |
|
protected |
◆ m_entries
◆ m_form
std::string tools::hdf5::pages::m_form |
|
protected |
◆ m_group
hid_t tools::hdf5::pages::m_group |
|
protected |
◆ m_name
std::string tools::hdf5::pages::m_name |
|
protected |
◆ m_out
std::ostream& tools::hdf5::pages::m_out |
|
protected |
◆ m_pos
◆ m_write
bool tools::hdf5::pages::m_write |
|
protected |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/hdf5/pages