ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class archive

alps::hdf5::archive

Synopsis

// In header: <alps/hdf5.hpp>


class archive {
public:
  // member classes/structs/unions

  struct log_type {
    boost::posix_time::ptime time;
    std::string name;
  };
  // construct/copy/destruct
  archive(archive const &);
  archive(std::string const &, hid_t(*)(std::string const &), bool = false);
  ~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 complete_path(std::string const &) const;
  bool is_group(std::string const &) const;
  bool is_data(std::string const &) const;
  bool is_attribute(std::string const &) const;
  std::vector< std::size_t > extent(std::string const &) const;
  std::size_t dimensions(std::string const &) const;
  bool is_scalar(std::string const &) const;
  bool is_string(std::string const &) const;
  bool is_int(std::string const &) const;
  bool is_uint(std::string const &) const;
  bool is_long(std::string const &) const;
  bool is_ulong(std::string const &) const;
  bool is_longlong(std::string const &) const;
  bool is_ulonglong(std::string const &) const;
  bool is_float(std::string const &) const;
  bool is_double(std::string const &) const;
  bool is_complex(std::string const &) const;
  bool is_null(std::string const &) const;
  void serialize(std::string const &);
  void delete_data(std::string const &) const;
  void delete_group(std::string const &) const;
  void delete_attribute(std::string const &) const;
  std::vector< std::string > list_children(std::string const &) const;
  std::vector< std::string > list_attributes(std::string const &) const;

  // protected member functions
  hid_t create_path(std::string const &, hid_t, hid_t, int, 
                    hsize_t const * = NULL, bool = true) const;
  hid_t create_dataset(std::string const &, hid_t, hid_t, int, 
                       hsize_t const * = NULL, bool = true) const;
  void copy_attributes(hid_t, hid_t, std::vector< std::string > const &) const;
  hid_t save_comitted_data(std::string const &, hid_t, hid_t, int, 
                           hsize_t const * = NULL, bool = true) const;
  hid_t open_attribute(std::string const &) const;
  template<typename T, typename U> 
    void get_helper_read(T &, hid_t, hid_t, bool) const;
  template<typename T, typename I> 
    void get_helper(std::string const &, T &, bool) const;
  template<typename T> void get_data(std::string const &, T &) const;
  template<typename T> void get_attribute(std::string const &, T &) const;
  template<typename T> void set_data(std::string const &, T const &) const;
  template<typename I, typename O> 
    void set_attr_copy(I, O, std::size_t, std::size_t) const;
  void set_attr_copy(serializable_type< std::string >::type const *, 
                     std::vector< native_type< std::string >::type >::iterator, 
                     std::size_t, std::size_t) const;
  template<typename T> 
    void set_attribute(std::string const &, T const &) const;
  void set_group(std::string const &) const;

  // private member functions
  template<typename T> hid_t get_native_type(T) const;
  hid_t get_native_type(char) const;
  hid_t get_native_type(signed) const;
  hid_t get_native_type(unsigned) const;
  hid_t get_native_type(short) const;
  hid_t get_native_type(unsigned) const;
  hid_t get_native_type(int) const;
  hid_t get_native_type(unsigned) const;
  hid_t get_native_type(long) const;
  hid_t get_native_type(unsigned) const;
  hid_t get_native_type(long) const;
  hid_t get_native_type(unsigned long) const;
  hid_t get_native_type(float) const;
  hid_t get_native_type(double) const;
  hid_t get_native_type(long) const;
  hid_t get_native_type(bool) const;
  hid_t get_native_type(unspecified) const;
  hid_t get_native_type(std::string) const;
  template<typename T> bool is_type(std::string const &) const;
  int compress() const;
  int revision() const;
  hid_t state_id() const;
  hid_t log_id() const;
  hid_t complex_id() const;
  hid_t file_id() const;

  // private static functions
  static herr_t child_visitor(hid_t, char const *, const H5L_info_t *, void *);
  static herr_t attr_visitor(hid_t, char const *, const H5A_info_t *, void *);
};

Description

archive public construct/copy/destruct

  1. archive(archive const & rhs);
  2. archive(std::string const & filename, hid_t(*)(std::string const &) F, 
            bool compress = false);
  3. ~archive();

archive public member functions

  1. std::string const & filename() const;
  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 = "");
  5. std::vector< std::pair< std::string, std::string > > list_revisions() const;
  6. void export_revision(std::size_t revision, std::string const & file) const;
  7. std::string get_context() const;
  8. void set_context(std::string const & context);
  9. std::string complete_path(std::string const & p) const;
  10. bool is_group(std::string const & p) const;
  11. bool is_data(std::string const & p) const;
  12. bool is_attribute(std::string const & p) const;
  13. std::vector< std::size_t > extent(std::string const & p) const;
  14. std::size_t dimensions(std::string const & p) const;
  15. bool is_scalar(std::string const & p) const;
  16. bool is_string(std::string const & p) const;
  17. bool is_int(std::string const & p) const;
  18. bool is_uint(std::string const & p) const;
  19. bool is_long(std::string const & p) const;
  20. bool is_ulong(std::string const & p) const;
  21. bool is_longlong(std::string const & p) const;
  22. bool is_ulonglong(std::string const & p) const;
  23. bool is_float(std::string const & p) const;
  24. bool is_double(std::string const & p) const;
  25. bool is_complex(std::string const & p) const;
  26. bool is_null(std::string const & p) const;
  27. void serialize(std::string const & p);
  28. void delete_data(std::string const & p) const;
  29. void delete_group(std::string const & p) const;
  30. void delete_attribute(std::string const & p) const;
  31. std::vector< std::string > list_children(std::string const & p) const;
  32. std::vector< std::string > list_attributes(std::string const & p) const;

archive protected member functions

  1. hid_t create_path(std::string const & p, hid_t type_id, hid_t space_id, int d, 
                      hsize_t const * s = NULL, bool set_prop = true) const;
  2. hid_t create_dataset(std::string const & p, hid_t type_id, hid_t space_id, 
                         int d, hsize_t const * s = NULL, bool set_prop = true) const;
  3. void copy_attributes(hid_t dest_id, hid_t source_id, 
                         std::vector< std::string > const & names) const;
  4. hid_t save_comitted_data(std::string const & p, hid_t type_id, hid_t space_id, 
                             int d, hsize_t const * s = NULL, 
                             bool set_prop = true) const;
  5. hid_t open_attribute(std::string const & p) const;
  6. template<typename T, typename U> 
      void get_helper_read(T & v, hid_t data_id, hid_t type_id, bool is_attr) const;
  7. template<typename T, typename I> 
      void get_helper(std::string const & p, T & v, bool is_attr) const;
  8. template<typename T> void get_data(std::string const & p, T & v) const;
  9. template<typename T> void get_attribute(std::string const & p, T & v) const;
  10. template<typename T> void set_data(std::string const & p, T const & v) const;
  11. template<typename I, typename O> 
      void set_attr_copy(I i, O o, std::size_t n, std::size_t s) const;
  12. void set_attr_copy(serializable_type< std::string >::type const * i, 
                       std::vector< native_type< std::string >::type >::iterator o, 
                       std::size_t n, std::size_t s) const;
  13. template<typename T> 
      void set_attribute(std::string const & p, T const & v) const;
  14. void set_group(std::string const & p) const;

archive private member functions

  1. template<typename T> hid_t get_native_type(T) const;
  2. hid_t get_native_type(char) const;
  3. hid_t get_native_type(signed char) const;
  4. hid_t get_native_type(unsigned char) const;
  5. hid_t get_native_type(short) const;
  6. hid_t get_native_type(unsigned short) const;
  7. hid_t get_native_type(int) const;
  8. hid_t get_native_type(unsigned) const;
  9. hid_t get_native_type(long) const;
  10. hid_t get_native_type(unsigned long) const;
  11. hid_t get_native_type(long long) const;
  12. hid_t get_native_type(unsigned long long) const;
  13. hid_t get_native_type(float) const;
  14. hid_t get_native_type(double) const;
  15. hid_t get_native_type(long double) const;
  16. hid_t get_native_type(bool) const;
  17. hid_t get_native_type(unspecified) const;
  18. hid_t get_native_type(std::string) const;
  19. template<typename T> bool is_type(std::string const & p) const;
  20. int compress() const;
  21. int revision() const;
  22. hid_t state_id() const;
  23. hid_t log_id() const;
  24. hid_t complex_id() const;
  25. hid_t file_id() const;

archive private static functions

  1. static herr_t 
    child_visitor(hid_t, char const * n, const H5L_info_t *, void * d);
  2. static herr_t 
    attr_visitor(hid_t, char const * n, const H5A_info_t *, void * d);
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext