|
OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
|
Implementation of some methods that might be shared. More...
#include <file.h>
Public Member Functions | |
| FileCommon (const std::string &filename, OpenMode mode, const OpenZGY::IOContext *iocontext) | |
| virtual std::int64_t | _real_eof () const |
| Get the current file size for error reporting. More... | |
| virtual void | _check_short_read (std::int64_t offset, std::int64_t size, std::int64_t got) const |
| Throw a descriptive error if there was something wrong with the read. More... | |
Public Member Functions inherited from InternalZGY::FileADT | |
| virtual void | xx_read (void *data, std::int64_t offset, std::int64_t size, UsageHint usagehint=UsageHint::Unknown)=0 |
| virtual void | xx_readv (const ReadList &requests, bool parallel_ok=false, bool immutable_ok=false, bool transient_ok=false, UsageHint usagehint=UsageHint::Unknown)=0 |
| virtual void | xx_write (const void *data, std::int64_t offset, std::int64_t size, UsageHint usagehint=UsageHint::Unknown)=0 |
| virtual void | xx_close ()=0 |
| virtual std::int64_t | xx_eof () const =0 |
| virtual bool | xx_threadsafe () const =0 |
| virtual bool | xx_iscloud () const =0 |
Protected Attributes | |
| FileConfig | _config |
| OpenMode | _mode |
| std::string | _name |
| std::int64_t | _eof |
| std::shared_ptr< SummaryTimer > | _rtimer |
| std::shared_ptr< SummaryTimer > | _wtimer |
Additional Inherited Members | |
Static Public Member Functions inherited from InternalZGY::FileADT | |
| static std::shared_ptr< FileADT > | factory (const std::string &filename, OpenMode mode, const OpenZGY::IOContext *iocontext) |
Static Protected Member Functions inherited from InternalZGY::FileADT | |
| static std::string | _nice (std::int64_t n) |
| Human readable number. | |
| static void | _validate_read (void *data, std::int64_t offset, std::int64_t size, std::int64_t eof, OpenMode mode) |
| static void | _validate_write (const void *data, std::int64_t offset, std::int64_t size, OpenMode mode) |
| static void | _validate_readv (const ReadList &requests, std::int64_t eof, OpenMode mode) |
Implementation of some methods that might be shared.
Using this class is optional. Concrete classes can inherit directly from FileADT if they want to.
|
virtual |
Throw a descriptive error if there was something wrong with the read.
Currently works for local files only. TODO-Low fix?
|
virtual |
Get the current file size for error reporting.
The default implementation in the base class just assumes that the xx_eof() that is (probably) maintained internally is correct.
Reimplemented in InternalZGY::LocalFileLinux.
1.8.17