ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template archive

alps::hdf5::archive

Synopsis

// 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 &) ;
};

Description

archive public construct/copy/destruct

  1. archive(std::string const & file);
  2. ~archive();

archive public member functions

  1. std::string const & filename() const;

    Returns:

    return the filename of the file, the arive ist based on

  2. std::string encode_segment(std::string const & s) ;
  3. std::string decode_segment(std::string const & s) ;
  4. void commit(std::string const & name = "") ;
    create a checkpoint of the data.
  5. std::vector< std::pair< std::string, std::string > > list_revisions() const;

    Returns:

    list of all checkpoints with name and time

  6. void export_revision(std::size_t revision, std::string const & file) const;
    export a checkpoint to a separat file
  7. std::string get_context() const;
    get the current context of the archive
  8. void set_context(std::string const & context) ;
    set the context of the archive
  9. std::string compute_path(std::string const & path) const;
    compute the absolte path given a path relative to the context
  10. bool is_group(std::string const & path) const;
    checks if a group is located at the given path
  11. bool is_data(std::string const & path) const;
    checks if a dataset is located at the given path
  12. bool is_scalar(std::string const & path) const;
    checks if a dataset containing a scalar is located at the given path
  13. bool is_null(std::string const & path) const;
    checks if a dataset containing a null pinter is located at the given path
  14. 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/
  15. void delete_data(std::string const & path) const;
    deletes a dataset
  16. 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

  17. std::size_t dimensions(std::string const & path) const;
    number of dimensions of the dataset located at the given path
  18. std::vector< std::string > list_children(std::string const & path) const;
    list of all child segments of the given path
  19. std::vector< std::string > list_attr(std::string const & path) const;
    list of all attributes of the fiven path
  20. template<typename T> void serialize(std::string const & p, T const & v) ;
    write data to archive
  21. template<typename T> void serialize(std::string const & p, T & v) ;
    read data from archive
  22. void serialize(std::string const & p) ;
    create group at given path
Copyright © 2009, 2010 Lukas Gamper

PrevUpHomeNext