|
Seismic Drive Client API
|
This class represents a generic cloud storage dataset in read only mode. More...
#include <SDReadOnlyGenericDatasetAccessor.h>
Public Member Functions | |
| SDReadOnlyGenericDatasetAccessor (const std::string &ss) | |
| Constructor. More... | |
| SDReadOnlyGenericDatasetAccessor (const std::string &ss, SDManager *sdManager) | |
| Constructor. More... | |
| ~SDReadOnlyGenericDatasetAccessor () | |
| SDReadOnlyGenericDatasetAccessor (SDReadOnlyGenericDatasetAccessor &&rhs) noexcept | |
| Move Constructor. More... | |
| SDReadOnlyGenericDatasetAccessor & | operator= (SDReadOnlyGenericDatasetAccessor &&rhs) noexcept |
| Move Assignment Operator. More... | |
| SDReadOnlyGenericDatasetAccessor (const SDReadOnlyGenericDatasetAccessor &rhs)=delete | |
| Copy Constructor. More... | |
| SDReadOnlyGenericDatasetAccessor & | operator= (const SDReadOnlyGenericDatasetAccessor &rhs)=delete |
| Copy Assignment Operator. More... | |
| void | readBlock (int blocknum, char *data, size_t offset, size_t numBytes) |
| Read a block of data from cloud storage. More... | |
| void | readBlock (int blocknum, char *data, size_t len) |
| Read a block of data from cloud storage. More... | |
| void | readBlock (const std::string &blockName, char *data, size_t offset, size_t numBytes) |
| Read a block of data from cloud storage. More... | |
| void | readBlock (const std::string &blockName, char *data, size_t len) |
| Read a block of data from cloud storage. More... | |
| long long | getBlockSize (int blocknum) |
| Gets the size of a block. More... | |
| long long | getBlockSize (const std::string &blockName) |
| Gets the size of a block. More... | |
Friends | |
| class | SDReadOnlyGenericDatasetTest |
This class represents a generic cloud storage dataset in read only mode.
This class is a Generic ReadOnly Dataset class to read cloud storage objects as sequential(0...n-1) file blocks.
| seismicdrive::SDReadOnlyGenericDatasetAccessor::SDReadOnlyGenericDatasetAccessor | ( | const std::string & | ss | ) |
Constructor.
| ss | is the serialized SDReadOnlyGenericDataset object. The serialized object can be generated through the SDGeneriDataset class |
| seismicdrive::SDReadOnlyGenericDatasetAccessor::SDReadOnlyGenericDatasetAccessor | ( | const std::string & | ss, |
| SDManager * | sdManager | ||
| ) |
Constructor.
| ss | is the serialized SDReadOnlyGenericDataset object. The serialized object can be generated through the SDGeneriDataset class |
| sdManager | is the sdManager to use through the lifetime of this accessor |
| seismicdrive::SDReadOnlyGenericDatasetAccessor::~SDReadOnlyGenericDatasetAccessor | ( | ) |
Destructor.
If the file is opened for writing (not READ_ONLY), it will be closed.
|
noexcept |
Move Constructor.
This contructor moves the SDReadOnlyGenericDatasetAccessor object from the source to the new object and destroy the source object.
|
delete |
Copy Constructor.
This contructor makes a copy of the SDReadOnlyGenericDatasetAccessor object from the source to the new object without modifying the source object.
| long long seismicdrive::SDReadOnlyGenericDatasetAccessor::getBlockSize | ( | int | blocknum | ) |
Gets the size of a block.
This method is an accessor used to get the size of a block in bytes given the block number.
| blocknum | should be in the range 0..getBlockNum()-1 |
| long long seismicdrive::SDReadOnlyGenericDatasetAccessor::getBlockSize | ( | const std::string & | blockName | ) |
Gets the size of a block.
This method is an accessor used to get the size of a block in bytes given the block name.
| blockName | is the name of the block |
|
noexcept |
Move Assignment Operator.
Same functionality as the move constructor.
|
delete |
Copy Assignment Operator.
Same functionality as the copy constructor.
| void seismicdrive::SDReadOnlyGenericDatasetAccessor::readBlock | ( | int | blocknum, |
| char * | data, | ||
| size_t | offset, | ||
| size_t | numBytes | ||
| ) |
Read a block of data from cloud storage.
This method reads a block of data specified by the block number. It expects the size of the data to read in bytes.
| blocknum | should be in the range 0..getBlockNum()-1 |
| data | is a buffer where read data will be saved (pre-allocated) |
| offset | is the starting reading offset |
| numBytes | is the size in byte of the data to read |
| void seismicdrive::SDReadOnlyGenericDatasetAccessor::readBlock | ( | int | blocknum, |
| char * | data, | ||
| size_t | len | ||
| ) |
Read a block of data from cloud storage.
This method reads a block of data specified by the block number.
| blocknum | should be in the range 0..getBlockNum()-1 |
| data | is a buffer where read data will be saved (pre-allocated) |
| len | is the param where the reading len will be stored |
| void seismicdrive::SDReadOnlyGenericDatasetAccessor::readBlock | ( | const std::string & | blockName, |
| char * | data, | ||
| size_t | offset, | ||
| size_t | numBytes | ||
| ) |
Read a block of data from cloud storage.
This method reads a block of data specified by the block name. It expects the size of the data to read in bytes.
| blockName | is the name of the block to read |
| data | is a buffer where read data will be saved (pre-allocated) |
| offset | is the starting reading offset |
| numBytes | is the size in byte of the data to read |
| void seismicdrive::SDReadOnlyGenericDatasetAccessor::readBlock | ( | const std::string & | blockName, |
| char * | data, | ||
| size_t | len | ||
| ) |
Read a block of data from cloud storage.
This method reads a block of data specified by the block name.
| blockName | is the name of the block to read |
| data | is a buffer where read data will be saved (pre-allocated) |
| len | is the param where the reading len will be stored |
|
friend |
1.8.14