28 #ifndef STORAGE_ARCHIVE_H
29 #define STORAGE_ARCHIVE_H
31 #include <boost/utility.hpp>
32 #include <alps/hdf5.hpp>
33 #include <alps/utility/encode.hpp>
37 inline std::string
once(std::string fp){
41 inline void uniq(std::string fp){
46 archive(std::string fp) : write(false), fp(fp) {
47 impl =
new alps::hdf5::archive(fp);
49 archive(std::string fp,
const char* rights) : write(strcmp(rights,
"w") == 0), fp(fp) {
50 impl =
new alps::hdf5::archive(
once(fp), rights);
57 return impl->is_group(path);
60 return impl->is_scalar(path);
63 return impl->is_data(path);
73 alps::hdf5::detail::archive_proxy<alps::hdf5::archive>
operator[](std::string path){
79 alps::hdf5::archive* impl;
82 inline std::string
encode(std::string
const & s){
83 return alps::hdf5_name_encode(s);
void operator<<(const T &obj)
alps::hdf5::detail::archive_proxy< alps::hdf5::archive > operator[](std::string path)
std::string encode(std::string const &s)
bool is_group(const char *path)
std::string once(std::string fp)
bool is_data(const char *path)
void uniq(std::string fp)
bool is_scalar(const char *path)
archive(std::string fp, const char *rights)