ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
storage::archive Class Reference

#include <archive.h>

Inheritance diagram for storage::archive:

Public Member Functions

 archive (std::string fp)
 
 archive (std::string fp, const char *rights)
 
 ~archive ()
 
bool is_group (const char *path)
 
bool is_scalar (const char *path)
 
bool is_data (const char *path)
 
template<typename T >
void operator<< (const T &obj)
 
template<typename T >
void operator>> (T &obj)
 
alps::hdf5::detail::archive_proxy
< alps::hdf5::archive > 
operator[] (std::string path)
 

Detailed Description

Definition at line 44 of file archive.h.

Constructor & Destructor Documentation

storage::archive::archive ( std::string  fp)
inline

Definition at line 46 of file archive.h.

46  : write(false), fp(fp) {
47  impl = new alps::hdf5::archive(fp);
48  }
storage::archive::archive ( std::string  fp,
const char *  rights 
)
inline

Definition at line 49 of file archive.h.

49  : write(strcmp(rights,"w") == 0), fp(fp) {
50  impl = new alps::hdf5::archive(once(fp), rights);
51  }
std::string once(std::string fp)
Definition: archive.h:37
storage::archive::~archive ( )
inline

Definition at line 52 of file archive.h.

52  {
53  delete impl;
54  if(write) uniq(fp);
55  }
void uniq(std::string fp)
Definition: archive.h:41

Member Function Documentation

bool storage::archive::is_data ( const char *  path)
inline

Definition at line 62 of file archive.h.

62  {
63  return impl->is_data(path);
64  }
bool storage::archive::is_group ( const char *  path)
inline

Definition at line 56 of file archive.h.

56  {
57  return impl->is_group(path);
58  }
bool storage::archive::is_scalar ( const char *  path)
inline

Definition at line 59 of file archive.h.

59  {
60  return impl->is_scalar(path);
61  }
template<typename T >
void storage::archive::operator<< ( const T &  obj)
inline

Definition at line 66 of file archive.h.

66  {
67  (*impl) << obj;
68  }
template<typename T >
void storage::archive::operator>> ( T &  obj)
inline

Definition at line 70 of file archive.h.

70  {
71  (*impl) >> obj;
72  }
alps::hdf5::detail::archive_proxy<alps::hdf5::archive> storage::archive::operator[] ( std::string  path)
inline

Definition at line 73 of file archive.h.

73  {
74  return (*impl)[path];
75  }

The documentation for this class was generated from the following file: