libpniio
|
File object. More...
#include <nxfile.hpp>
Public Types | |
typedef nximp_map< IMPID > ::file_imp | imp_type |
implementation type More... | |
typedef nxfile< IMPID > | file_type |
Nexus file type. More... | |
Public Member Functions | |
nxfile () | |
default constructor More... | |
nxfile (const file_type &file) | |
copy constrcutor More... | |
nxfile (file_type &&f) | |
move constructor More... | |
nxfile (imp_type &&imp) | |
implemenetation move constructor More... | |
~nxfile () | |
destructor More... | |
file_type & | operator= (const file_type &f) |
copy assignment operator More... | |
file_type & | operator= (file_type &&f) |
move assignment operator More... | |
void | flush () const |
flush the file More... | |
bool | is_readonly () const |
check read only More... | |
void | close () |
close the file More... | |
nxobject_trait< IMPID >::group_type | root () const |
get root group More... | |
bool | is_valid () const noexcept |
check validity More... | |
Static Public Member Functions | |
static file_type | open_file (const string &n, bool ro=true) |
open file More... | |
static file_type | create_files (const string &n, ssize_t ssize, bool ow=false) |
create file family More... | |
static file_type | create_file (const string &n, bool ow=false) |
create single file More... | |
Private Attributes | |
imp_type | _imp |
implementation instance More... | |
nxfile represents a file for reading and writing data too. It is the basic data holding entity. You can use NXField to read from or write data to a file.
The copy and move constructors as well as the assignment operators must be implemented as the class has a non-trivial destructor.
typedef nxfile<IMPID> pni::io::nx::nxfile< IMPID >::file_type |
typedef nximp_map<IMPID>::file_imp pni::io::nx::nxfile< IMPID >::imp_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
type_error | if there is an issue with the internal file object |
object_error | in case of any other error |
|
inlinestatic |
Creates a single file.
invalid_object_error | if the newly create file object is not valid |
io_error | if attribute writing failed |
object_error | if object creation failed (in any other case) |
n | name of the file |
ow | overwrite flag |
|
inlinestatic |
Static method to create a set of files. In the case of the HDF5 backend the family driver is used and the data is distributed over a bunch of files.
invalid_object_error | if the newly created file object is not valid |
io_error | if attribute writing or flush fails |
object_error | in case of any other error |
n | name of the file to create |
ssize | split size (not implemented yet) |
ow | overwrite existing file if true |
|
inline |
io_error | if flush fails |
object_error | in case of any other error |
|
inline |
invalid_object_error | if file is not valid |
file_error | if the file intent cannot be retrieved |
object_error | in case of any other error |
|
inlinenoexcept |
object_error | if validity status check fails |
|
inlinestatic |
Static method opening an existing file.
invalid_object_error | if the new file object is not valid |
object_error | in case of any other error |
file_error | if the file is not an HDF5 file |
n | name of the file |
ro | open read only if true |
|
inline |
|
inline |
|
inline |
Return the root group of the file.
invalid_object_error | if the file is not valid |
type_error | if the group type cannot be determined |
object_error | in case of any other error |
|
private |