OpenZGY/C++ Public API (ALPHA)
Access seismic data stored in ZGY format.
Public Member Functions | Static Public Member Functions | List of all members
OpenZGY::IZgyUtils Class Referenceabstract

Operations other than read and write. More...

#include <api.h>

Inheritance diagram for OpenZGY::IZgyUtils:
OpenZGY::Impl::ZgyUtils

Public Member Functions

virtual void deletefile (const std::string &filename, bool missing_ok=true)=0
 Delete a file. Works both for local and cloud files. More...
 

Static Public Member Functions

static std::shared_ptr< IZgyUtilsutils (const std::string &prefix, const IOContext *iocontext)
 Create a new concrete instance of IZgyUtils. More...
 

Detailed Description

Operations other than read and write.

Any operations that don't fit into IZgyReader or IZgyWriter go here. Such as deleting a file. Or any other operation that does not need the file to be open first.

Member Function Documentation

◆ deletefile()

virtual void OpenZGY::IZgyUtils::deletefile ( const std::string &  filename,
bool  missing_ok = true 
)
pure virtual

Delete a file. Works both for local and cloud files.

Note that the instance must be of the correct (local or cloud) type.

Implemented in OpenZGY::Impl::ZgyUtils.

◆ utils()

std::shared_ptr< IZgyUtils > OpenZGY::IZgyUtils::utils ( const std::string &  prefix,
const IOContext iocontext 
)
static

Create a new concrete instance of IZgyUtils.

Parameters
prefixFile name or file name prefix.
iocontextCredentials and other configuration.

The reason you need to supply a file name or a file name prefix is that you need to provide enough information to identify the back-end that this instance will be bound to. So both "sd://some/bogus/file.zgy" and just "sd://" will produce an instance that works for the seismic store.

For performance reasons you should consider caching one IZgyUtils instance for each back end you will be using. Instead of just creating a new one each time you want to invoke a method. Just remember that most operations need an instance created with the same prefix.


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