isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
isce3::io::gdal::Buffer Class Reference

Interface to 2-D memory array. More...

#include <Buffer.h>

Public Member Functions

constexpr Buffer (const void *data, GDALDataType datatype, const std::array< int, 2 > &shape)
 Create a buffer object describing a read-only row-major, contiguous data buffer. More...
 
constexpr Buffer (void *data, GDALDataType datatype, const std::array< int, 2 > &shape, GDALAccess access=GA_Update)
 Create a buffer object describing a row-major, contiguous data buffer. More...
 
constexpr Buffer (const void *data, GDALDataType datatype, const std::array< int, 2 > &shape, const std::array< std::size_t, 2 > &strides)
 Create a buffer object describing a read-only data buffer. More...
 
constexpr Buffer (void *data, GDALDataType datatype, const std::array< int, 2 > &shape, const std::array< std::size_t, 2 > &strides, GDALAccess access=GA_Update)
 Create a buffer object describing a data buffer. More...
 
constexpr void * data ()
 Pointer to the start of the data buffer.
 
constexpr const void * data () const
 Pointer to the start of the data buffer.
 
constexpr GDALDataType datatype () const
 Datatype identifier.
 
constexpr std::size_t itemsize () const
 Size in bytes of a single element.
 
constexpr const std::array
< int, 2 > & 
shape () const
 Buffer dims (nrows, ncols)
 
constexpr int length () const
 Number of rows.
 
constexpr int width () const
 Number of columns.
 
constexpr const std::array
< std::size_t, 2 > & 
strides () const
 Stride in bytes between the start of adjacent elements along each dimension.
 
constexpr std::size_t rowstride () const
 Stride in bytes between the start of adjacent rows.
 
constexpr std::size_t colstride () const
 Stride in bytes between the start of adjacent columns.
 
constexpr GDALAccess access () const
 Access mode.
 
template<typename T >
constexpr TypedBuffer< T > cast () const
 Cast to typed buffer. More...
 

Detailed Description

Interface to 2-D memory array.

Constructor & Destructor Documentation

constexpr isce3::io::gdal::Buffer::Buffer ( const void *  data,
GDALDataType  datatype,
const std::array< int, 2 > &  shape 
)

Create a buffer object describing a read-only row-major, contiguous data buffer.

Parameters
[in]dataPointer to start of data buffer
[in]datatypeDatatype identifier
[in]shapeBuffer dims (nrows, ncols)
constexpr isce3::io::gdal::Buffer::Buffer ( void *  data,
GDALDataType  datatype,
const std::array< int, 2 > &  shape,
GDALAccess  access = GA_Update 
)

Create a buffer object describing a row-major, contiguous data buffer.

Parameters
[in]dataPointer to start of data buffer
[in]datatypeDatatype identifier
[in]shapeBuffer dims (nrows, ncols)
[in]accessAccess mode
constexpr isce3::io::gdal::Buffer::Buffer ( const void *  data,
GDALDataType  datatype,
const std::array< int, 2 > &  shape,
const std::array< std::size_t, 2 > &  strides 
)

Create a buffer object describing a read-only data buffer.

Parameters
[in]dataPointer to start of data buffer
[in]datatypeDatatype identifier
[in]shapeBuffer dims (nrows, ncols)
[in]stridesStride in bytes between the start of adjacent elements along each dimension
constexpr isce3::io::gdal::Buffer::Buffer ( void *  data,
GDALDataType  datatype,
const std::array< int, 2 > &  shape,
const std::array< std::size_t, 2 > &  strides,
GDALAccess  access = GA_Update 
)

Create a buffer object describing a data buffer.

Parameters
[in]dataPointer to start of data buffer
[in]datatypeDatatype identifier
[in]shapeBuffer dims (nrows, ncols)
[in]stridesStride in bytes between the start of adjacent elements along each dimension
[in]accessAccess mode

Member Function Documentation

template<typename T >
constexpr TypedBuffer< T > isce3::io::gdal::Buffer::cast ( ) const

Cast to typed buffer.

Exceptions
isce3::except::RuntimeErrorif the requested type does not match the underlying buffer datatype

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

Generated for ISCE3.0 by doxygen 1.8.5.