|
PolyFEM
|
HDF5 logical paths always use POSIX separators and roots. More...
#include <ResourceIO.hpp>
Classes | |
| class | Impl |
Public Member Functions | |
| HDF5IO (const std::filesystem::path &file, const std::string &root="/", const std::filesystem::path &host_directory={}, const std::string &storage_root="") | |
| ~HDF5IO () override | |
| std::unique_ptr< const ResourceIO > | with_root (const std::string &root) const override |
| std::string | canonical_path (const std::string &path) const override |
| Absolute resource identity, independent of the active reader root. | |
| bool | exists (const std::string &path) const override |
| bool | is_group (const std::string &path) const override |
| std::vector< std::string > | list (const std::string &path) const override |
| std::unique_ptr< std::istream > | open (const std::string &path, bool binary) const override |
| std::string | read_string (const std::string &path) const override |
| Eigen::MatrixXd | read_matrix (const std::string &path) const override |
| Eigen::MatrixXi | read_int_matrix (const std::string &path) const override |
| std::vector< double > | read_double_vector (const std::string &path) const override |
| std::vector< int > | read_int_vector (const std::string &path) const override |
| std::vector< long > | read_long_vector (const std::string &path) const override |
| bool | has_attribute (const std::string &path, const std::string &name) const override |
| long | read_integer_attribute (const std::string &path, const std::string &name) const override |
| std::string | read_string_attribute (const std::string &path, const std::string &name) const override |
| std::array< long, 2 > | read_shape_attribute (const std::string &path, const std::string &name) const override |
| std::filesystem::path | materialize (const std::string &path) const override |
| const std::filesystem::path & | host_directory () const override |
| Host directory used only as the base for ordinary filesystem outputs. | |
| std::string | describe (const std::string &path) const override |
| const std::filesystem::path & | file_path () const |
| const std::string & | logical_root () const |
| std::string | logical_resolve (const std::string &path) const |
| std::string | resolve (const std::string &path) const |
Public Member Functions inherited from polyfem::io::ResourceIO | |
| virtual | ~ResourceIO ()=default |
| std::vector< std::string > | glob (const std::string &pattern) const |
| Glob normalized logical paths using POSIX '*' and '?' wildcards. | |
| std::vector< std::string > | accessed_resources () const |
| A snapshot of canonical paths consumed so far, including solver setup. | |
Private Attributes | |
| std::shared_ptr< Impl > | impl_ |
| std::filesystem::path | file_path_ |
| std::string | root_ |
| std::string | storage_root_ |
| std::filesystem::path | host_directory_ |
Additional Inherited Members | |
Protected Member Functions inherited from polyfem::io::ResourceIO | |
| ResourceIO () | |
| void | record_access (const std::string &path) const |
Protected Attributes inherited from polyfem::io::ResourceIO | |
| std::shared_ptr< AccessTracker > | access_tracker_ |
HDF5 logical paths always use POSIX separators and roots.
Strings and rank-one uint8 datasets are file resources; other numeric datasets are typed scalars/vectors/matrices. Integer reads reject overflow and floating-point datasets rather than silently truncating them.
Definition at line 101 of file ResourceIO.hpp.
|
explicit |
Definition at line 376 of file ResourceIO.cpp.
|
overridedefault |
|
inlineoverridevirtual |
Absolute resource identity, independent of the active reader root.
Implements polyfem::io::ResourceIO.
Definition at line 112 of file ResourceIO.hpp.
References logical_resolve().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 576 of file ResourceIO.cpp.
References file_path_, and resolve().
Referenced by materialize(), and read_string().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 425 of file ResourceIO.cpp.
References impl_, and resolve().
|
inline |
Definition at line 132 of file ResourceIO.hpp.
References file_path_.
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 517 of file ResourceIO.cpp.
References impl_, and resolve().
|
inlineoverridevirtual |
Host directory used only as the base for ordinary filesystem outputs.
Implements polyfem::io::ResourceIO.
Definition at line 129 of file ResourceIO.hpp.
References host_directory_.
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 427 of file ResourceIO.cpp.
References impl_, and resolve().
Referenced by list().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 436 of file ResourceIO.cpp.
References entries, impl_, is_group(), logical_resolve(), resolve(), root_, and storage_root_.
| std::string polyfem::io::HDF5IO::logical_resolve | ( | const std::string & | path | ) | const |
Definition at line 402 of file ResourceIO.cpp.
References root_, and storage_root_.
Referenced by canonical_path(), list(), resolve(), and with_root().
|
inline |
Definition at line 133 of file ResourceIO.hpp.
References root_.
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 541 of file ResourceIO.cpp.
References describe(), impl_, polyfem::log_and_throw_error(), read_string(), polyfem::io::ResourceIO::record_access(), and resolve().
Referenced by read_int_matrix(), read_long_vector(), and read_matrix().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 481 of file ResourceIO.cpp.
References read_string().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 500 of file ResourceIO.cpp.
References read_matrix().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 493 of file ResourceIO.cpp.
References impl_, materialize(), polyfem::io::ResourceIO::record_access(), and resolve().
Referenced by read_int_vector().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 505 of file ResourceIO.cpp.
References read_int_matrix().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 523 of file ResourceIO.cpp.
References impl_, polyfem::io::ResourceIO::record_access(), and resolve().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 510 of file ResourceIO.cpp.
References impl_, materialize(), polyfem::io::ResourceIO::record_access(), and resolve().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 486 of file ResourceIO.cpp.
References impl_, materialize(), polyfem::io::ResourceIO::record_access(), and resolve().
Referenced by read_double_vector().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 535 of file ResourceIO.cpp.
References impl_, polyfem::io::ResourceIO::record_access(), and resolve().
|
overridevirtual |
Reimplemented from polyfem::io::ResourceIO.
Definition at line 467 of file ResourceIO.cpp.
References describe(), impl_, polyfem::log_and_throw_error(), polyfem::io::ResourceIO::record_access(), and resolve().
Referenced by materialize(), and open().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 529 of file ResourceIO.cpp.
References impl_, polyfem::io::ResourceIO::record_access(), and resolve().
| std::string polyfem::io::HDF5IO::resolve | ( | const std::string & | path | ) | const |
Definition at line 418 of file ResourceIO.cpp.
References logical_resolve(), and storage_root_.
Referenced by describe(), exists(), has_attribute(), is_group(), list(), materialize(), read_int_matrix(), read_integer_attribute(), read_long_vector(), read_matrix(), read_shape_attribute(), read_string(), and read_string_attribute().
|
overridevirtual |
Implements polyfem::io::ResourceIO.
Definition at line 393 of file ResourceIO.cpp.
References polyfem::io::ResourceIO::access_tracker_, file_path_, host_directory_, impl_, logical_resolve(), and storage_root_.
|
private |
Definition at line 140 of file ResourceIO.hpp.
Referenced by describe(), file_path(), and with_root().
|
private |
Definition at line 143 of file ResourceIO.hpp.
Referenced by host_directory(), and with_root().
|
private |
Definition at line 139 of file ResourceIO.hpp.
Referenced by exists(), has_attribute(), is_group(), list(), materialize(), read_int_matrix(), read_integer_attribute(), read_long_vector(), read_matrix(), read_shape_attribute(), read_string(), read_string_attribute(), and with_root().
|
private |
Definition at line 141 of file ResourceIO.hpp.
Referenced by list(), logical_resolve(), and logical_root().
|
private |
Definition at line 142 of file ResourceIO.hpp.
Referenced by list(), logical_resolve(), resolve(), and with_root().