![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::hdf5::archive
// In header: <alps/hdf5.hpp> template<typename Tag> class archive { public: // construct/copy/destruct archive(std::string const &); ~archive(); // public member functions std::string const & filename() const; std::string encode_segment(std::string const &) ; std::string decode_segment(std::string const &) ; void commit(std::string const & = "") ; std::vector< std::pair< std::string, std::string > > list_revisions() const; void export_revision(std::size_t, std::string const &) const; std::string get_context() const; void set_context(std::string const &) ; std::string compute_path(std::string const &) const; bool is_group(std::string const &) const; bool is_data(std::string const &) const; bool is_scalar(std::string const &) const; bool is_null(std::string const &) const; bool is_attribute(std::string const &) const; void delete_data(std::string const &) const; std::vector< std::size_t > extent(std::string const &) const; std::size_t dimensions(std::string const &) const; std::vector< std::string > list_children(std::string const &) const; std::vector< std::string > list_attr(std::string const &) const; template<typename T> void serialize(std::string const &, T const &) ; template<typename T> void serialize(std::string const &, T &) ; void serialize(std::string const &) ; };
archive
public member functionsstd::string const & filename() const;
Returns: |
return the filename of the file, the arive ist based on |
std::string encode_segment(std::string const & s) ;
std::string decode_segment(std::string const & s) ;
void commit(std::string const & name = "") ;create a checkpoint of the data.
std::vector< std::pair< std::string, std::string > > list_revisions() const;
Returns: |
list of all checkpoints with name and time |
void export_revision(std::size_t revision, std::string const & file) const;export a checkpoint to a separat file
std::string get_context() const;get the current context of the archive
void set_context(std::string const & context) ;set the context of the archive
std::string compute_path(std::string const & path) const;compute the absolte path given a path relative to the context
bool is_group(std::string const & path) const;checks if a group is located at the given path
bool is_data(std::string const & path) const;checks if a dataset is located at the given path
bool is_scalar(std::string const & path) const;checks if a dataset containing a scalar is located at the given path
bool is_null(std::string const & path) const;checks if a dataset containing a null pinter is located at the given path
bool is_attribute(std::string const & path) const;checks if a attribute located at the given path. An attribute is addressed with a path of the form /path/to/
void delete_data(std::string const & path) const;deletes a dataset
std::vector< std::size_t > extent(std::string const & path) const;
Returns: |
extents of the dataset located at the given path. extend(...).size() == dimensions(...) always holds |
std::size_t dimensions(std::string const & path) const;number of dimensions of the dataset located at the given path
std::vector< std::string > list_children(std::string const & path) const;list of all child segments of the given path
std::vector< std::string > list_attr(std::string const & path) const;list of all attributes of the fiven path
template<typename T> void serialize(std::string const & p, T const & v) ;write data to archive
template<typename T> void serialize(std::string const & p, T & v) ;read data from archive
void serialize(std::string const & p) ;create group at given path
Copyright © 2009, 2010 Lukas Gamper |