bes  Updated for version 3.20.6
dmrpp::DmrppD4Opaque Class Reference
Collaboration diagram for dmrpp::DmrppD4Opaque:
Collaboration graph

Public Member Functions

virtual unsigned long add_chunk (const std::string &data_url, unsigned long long size, unsigned long long offset, const std::vector< unsigned int > &position_in_array)
 
virtual unsigned long add_chunk (const std::string &data_url, unsigned long long size, unsigned long long offset, std::string position_in_array="")
 Add a new chunk as defined by an h4:byteStream element. More...
 
 DmrppD4Opaque (const DmrppD4Opaque &rhs)
 
 DmrppD4Opaque (const std::string &n)
 
 DmrppD4Opaque (const std::string &n, const std::string &d)
 
virtual void dump (ostream &strm) const
 
virtual void dump (std::ostream &strm) const
 
virtual unsigned char * get_buf ()
 Get a pointer to start of the Opaque data buffer. More...
 
virtual const std::vector< unsigned int > & get_chunk_dimension_sizes () const
 
virtual unsigned int get_chunk_size_in_elements () const
 Get the number of elements in this chunk. More...
 
virtual const std::vector< Chunk > & get_immutable_chunks () const
 
virtual void ingest_compression_type (std::string compression_type_string)
 Parses the text content of the XML element h4:chunkDimensionSizes into the internal vector<unsigned int> representation. More...
 
virtual bool is_deflate_compression () const
 Returns true if this object utilizes deflate compression. More...
 
virtual bool is_shuffle_compression () const
 Returns true if this object utilizes shuffle compression. More...
 
DmrppD4Opaqueoperator= (const DmrppD4Opaque &rhs)
 
virtual void parse_chunk_dimension_sizes (std::string chunk_dim_sizes_string)
 Set the dimension sizes for a chunk. More...
 
void print_chunks_element (libdap::XMLWriter &xml, const std::string &name_space="")
 Print the Chunk information. More...
 
virtual void print_dap4 (libdap::XMLWriter &writer, bool constrained=false)
 
void print_dmrpp (libdap::XMLWriter &writer, bool constrained=false)
 Print the DMR++ response for the Scalar types. More...
 
virtual libdap::BaseType * ptr_duplicate ()
 
virtual bool read ()
 Read opaque data. More...
 
virtual void resize (unsigned long long size)
 Allocate. More...
 
void set_chunk_dimension_sizes (const std::vector< size_t > &chunk_dims)
 Set the value of the chunk dimension sizes given a vector of HDF5 hsize_t. More...
 
void set_deflate (bool value)
 Set the value of the deflate property. More...
 
void set_shuffle (bool value)
 Set the value of the shuffle property. More...
 

Static Public Attributes

static std::string d_dmrpp_ns = "http://xml.opendap.org/dap/dmrpp/1.0.0#"
 The DMR++ XML namespace. More...
 
static std::string d_ns_prefix = "dmrpp"
 The XML namespace prefix to use. More...
 
static bool d_print_chunks = false
 if true, print_dap4() prints chunk elements More...
 

Protected Member Functions

virtual std::vector< Chunk > & get_chunk_vec ()
 Returns a reference to the internal Chunk vector. More...
 
void m_duplicate_common (const DmrppCommon &dc)
 
virtual char * read_atomic (const std::string &name)
 read method for the atomic types More...
 

Detailed Description

Definition at line 39 of file DmrppD4Opaque.h.

Member Function Documentation

◆ add_chunk()

unsigned long dmrpp::DmrppCommon::add_chunk ( const std::string &  data_url,
unsigned long long  size,
unsigned long long  offset,
std::string  position_in_array = "" 
)
virtualinherited

Add a new chunk as defined by an h4:byteStream element.

Returns
The number of chunk refs (byteStreams) held.

Definition at line 153 of file DmrppCommon.cc.

◆ get_buf()

virtual unsigned char* dmrpp::DmrppD4Opaque::get_buf ( )
inlinevirtual

Get a pointer to start of the Opaque data buffer.

Note
This returns a pointer to the internal memory managed by libdap::D4Opaque. Make sure that the
  • d_buf field has enough memory allocated. There is no method in the libdap::D4Opaque class to allocate memory. This class must do that.

Definition at line 63 of file DmrppD4Opaque.h.

◆ get_chunk_size_in_elements()

virtual unsigned int dmrpp::DmrppCommon::get_chunk_size_in_elements ( ) const
inlinevirtualinherited

Get the number of elements in this chunk.

Returns
The number of elements; multiply by element size to get the number of bytes.

Definition at line 139 of file DmrppCommon.h.

◆ get_chunk_vec()

virtual std::vector<Chunk>& dmrpp::DmrppCommon::get_chunk_vec ( )
inlineprotectedvirtualinherited

Returns a reference to the internal Chunk vector.

Definition at line 82 of file DmrppCommon.h.

◆ ingest_compression_type()

void dmrpp::DmrppCommon::ingest_compression_type ( std::string  compression_type_string)
virtualinherited

Parses the text content of the XML element h4:chunkDimensionSizes into the internal vector<unsigned int> representation.

Parameters
compression_type_stringOne of "deflate" or "shuffle."

Definition at line 128 of file DmrppCommon.cc.

◆ is_deflate_compression()

virtual bool dmrpp::DmrppCommon::is_deflate_compression ( ) const
inlinevirtualinherited

Returns true if this object utilizes deflate compression.

Definition at line 107 of file DmrppCommon.h.

◆ is_shuffle_compression()

virtual bool dmrpp::DmrppCommon::is_shuffle_compression ( ) const
inlinevirtualinherited

Returns true if this object utilizes shuffle compression.

Definition at line 117 of file DmrppCommon.h.

◆ parse_chunk_dimension_sizes()

void dmrpp::DmrppCommon::parse_chunk_dimension_sizes ( std::string  chunk_dim_sizes_string)
virtualinherited

Set the dimension sizes for a chunk.

The string argument holds a space-separated list of integers that represent the dimensions of a chunk. Parse that string and store the integers in this instance.

Parameters
chunk_dimsThe sizes as a list of integers separated by spaces, e.g., '50 50'

Definition at line 90 of file DmrppCommon.cc.

◆ print_chunks_element()

void dmrpp::DmrppCommon::print_chunks_element ( libdap::XMLWriter &  xml,
const std::string &  name_space = "" 
)
inherited

Print the Chunk information.

Definition at line 205 of file DmrppCommon.cc.

◆ print_dmrpp()

void dmrpp::DmrppCommon::print_dmrpp ( libdap::XMLWriter &  writer,
bool  constrained = false 
)
inherited

Print the DMR++ response for the Scalar types.

Note
See DmrppArray::print_dap4() for a discussion about the design of this, and related, method.
Parameters
xmlWrite the XML to this instance of XMLWriter
constrainedIf true, print the constrained DMR. False by default.
See also
DmrppArray::print_dap4()

Definition at line 282 of file DmrppCommon.cc.

◆ read()

bool dmrpp::DmrppD4Opaque::read ( )
virtual

Read opaque data.

Read opaque data using a DMR++ metadata file. This is different from the DmrppArray::read() method because Opaque data cannot be subset, and it is thus much simpler.

Returns
Always returns true

Definition at line 177 of file DmrppD4Opaque.cc.

◆ read_atomic()

char * dmrpp::DmrppCommon::read_atomic ( const std::string &  name)
protectedvirtualinherited

read method for the atomic types

This method is used by the specializations of BaseType::read() in the 'atomic' type classes (libdap::Byte, libdap::In32, ...) to read data when those data are contained in a single chunk (i.e., using HDF5 contiguous storage).

Note
It is assumed that these data are never compressed. However, it is possible to call Chunk::inflate_chunk(...) after calling this method and then call Chunk::get_rbuf() to access the decompressed data.
Parameters
nameThe name of the variable, used for error messages
Returns
Pointer to a char buffer holding the data.
Exceptions
BESInternalErroron error.

Definition at line 187 of file DmrppCommon.cc.

◆ resize()

virtual void dmrpp::DmrppD4Opaque::resize ( unsigned long long  size)
inlinevirtual

Allocate.

  • size bytes for the opaque data
    Parameters
    size

Definition at line 72 of file DmrppD4Opaque.h.

◆ set_chunk_dimension_sizes()

void dmrpp::DmrppCommon::set_chunk_dimension_sizes ( const std::vector< size_t > &  chunk_dims)
inlineinherited

Set the value of the chunk dimension sizes given a vector of HDF5 hsize_t.

Definition at line 155 of file DmrppCommon.h.

◆ set_deflate()

void dmrpp::DmrppCommon::set_deflate ( bool  value)
inlineinherited

Set the value of the deflate property.

Definition at line 112 of file DmrppCommon.h.

◆ set_shuffle()

void dmrpp::DmrppCommon::set_shuffle ( bool  value)
inlineinherited

Set the value of the shuffle property.

Definition at line 122 of file DmrppCommon.h.

Member Data Documentation

◆ d_dmrpp_ns

string dmrpp::DmrppCommon::d_dmrpp_ns = "http://xml.opendap.org/dap/dmrpp/1.0.0#"
staticinherited

The DMR++ XML namespace.

Definition at line 90 of file DmrppCommon.h.

◆ d_ns_prefix

string dmrpp::DmrppCommon::d_ns_prefix = "dmrpp"
staticinherited

The XML namespace prefix to use.

Definition at line 91 of file DmrppCommon.h.

◆ d_print_chunks

bool dmrpp::DmrppCommon::d_print_chunks = false
staticinherited

if true, print_dap4() prints chunk elements

Definition at line 89 of file DmrppCommon.h.


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