Holds a single byte.
More...
#include <Byte.h>
|
| unsigned int | buf2val (void **val) override |
| | Byte (const Byte ©_from) |
| | Byte (const string &n) |
| | The Byte constructor.
|
| | Byte (const string &n, const string &d) |
| | The Byte server-side constructor.
|
| void | compute_checksum (Crc32 &checksum) override |
| bool | d4_ops (BaseType *b, int op) override |
| void | deserialize (D4StreamUnMarshaller &um, DMR &dmr) override |
| bool | deserialize (UnMarshaller &um, DDS *, bool) override |
| | Deserialize the char on stdin and put the result in _BUF.
|
| void | dump (ostream &strm) const override |
| | dumps information about this object
|
| Byte & | operator= (const Byte &rhs) |
| bool | ops (BaseType *b, int op) override |
| void | print_val (FILE *out, string space="", bool print_decl_p=true) override |
| void | print_val (ostream &out, string space="", bool print_decl_p=true) override |
| BaseType * | ptr_duplicate () override |
| bool | serialize (ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval) override |
| void | serialize (D4StreamMarshaller &m, DMR &dmr, bool filter=false) override |
| | Serialize a Byte.
|
| virtual bool | set_value (const dods_byte value) |
| std::vector< BaseType * > * | transform_to_dap2 (AttrTable *parent_attr_table) override |
| | DAP4 to DAP2 transform.
|
| unsigned int | val2buf (void *val, bool reuse=false) override |
| virtual dods_byte | value () const |
| unsigned int | width (bool=false) const override |
| int64_t | width_ll (bool=false) const override |
Holds a single byte.
This class is used to hold eight bits of information. No sign information is implied in its value.
- See also
- BaseType
Definition at line 59 of file Byte.h.
◆ Byte() [1/3]
| libdap::Byte::Byte |
( |
const string & | n | ) |
|
The Byte constructor.
The Byte constructor requires only the name of the variable to be created. The name may be omitted, which will create a nameless variable. This may be adequate for some applications.
- Parameters
-
| n | A string containing the name of the variable to be created. |
Definition at line 86 of file Byte.cc.
◆ Byte() [2/3]
The Byte server-side constructor.
This Byte constructor requires the name of the variable to be created and the name of the dataset from which this variable is being created. This constructor is used in server-side processing, loading structure in from a dataset.
- Parameters
-
| n | A string containing the name of the variable to be created. |
| d | A string containing the name of the dataset from which the variable is being created. |
Definition at line 98 of file Byte.cc.
◆ ~Byte()
| virtual libdap::Byte::~Byte |
( |
| ) |
|
|
inlinevirtual |
◆ Byte() [3/3]
| libdap::Byte::Byte |
( |
const Byte & | copy_from | ) |
|
◆ buf2val()
| unsigned int libdap::Byte::buf2val |
( |
void ** | val | ) |
|
|
override |
◆ compute_checksum()
| void libdap::Byte::compute_checksum |
( |
Crc32 & | checksum | ) |
|
|
override |
◆ d4_ops()
| bool libdap::Byte::d4_ops |
( |
BaseType * | b, |
|
|
int | op ) |
|
override |
- See also
- BaseType::d4_ops(BaseType *, int)
Definition at line 257 of file Byte.cc.
◆ deserialize() [1/2]
◆ deserialize() [2/2]
Deserialize the char on stdin and put the result in _BUF.
Definition at line 142 of file Byte.cc.
◆ dump()
| void libdap::Byte::dump |
( |
ostream & | strm | ) |
const |
|
override |
dumps information about this object
Displays the pointer value of this instance and information about this instance.
- Parameters
-
| strm | C++ i/o stream to dump the information to |
- Returns
- void
Definition at line 336 of file Byte.cc.
◆ operator=()
| Byte & libdap::Byte::operator= |
( |
const Byte & | rhs | ) |
|
◆ ops()
| bool libdap::Byte::ops |
( |
BaseType * | b, |
|
|
int | op ) |
|
override |
◆ print_val() [1/2]
| void libdap::Byte::print_val |
( |
FILE * | out, |
|
|
string | space = "", |
|
|
bool | print_decl_p = true ) |
|
override |
◆ print_val() [2/2]
| void libdap::Byte::print_val |
( |
ostream & | out, |
|
|
string | space = "", |
|
|
bool | print_decl_p = true ) |
|
override |
◆ ptr_duplicate()
| BaseType * libdap::Byte::ptr_duplicate |
( |
| ) |
|
|
override |
◆ serialize() [1/2]
Serialize the contents of member _BUF (the object's internal buffer, used to hold data) and write the result to stdout. If FLUSH is true, write the contents of the output buffer to the kernel. FLUSH is false by default. If CE_EVAL is true, evaluate the current constraint expression; only send data if the CE evaluates to true.
- Returns
- False if a failure to read, send or flush is detected, true otherwise.
Definition at line 122 of file Byte.cc.
◆ serialize() [2/2]
Serialize a Byte.
- Parameters
-
| m | |
| dmr | Unused |
| eval | Unused |
| filter | Unused |
- Exceptions
-
| Error | is thrown if the value needs to be read and that operation fails. |
Definition at line 158 of file Byte.cc.
◆ set_value()
| bool libdap::Byte::set_value |
( |
const dods_byte | value | ) |
|
|
virtual |
Set the value of this instance.
- Parameters
-
- Returns
- Always returns true; the return type of bool is for compatibility with the Passive* subclasses written by HAO.
Definition at line 203 of file Byte.cc.
◆ transform_to_dap2()
| std::vector< BaseType * > * libdap::Byte::transform_to_dap2 |
( |
AttrTable * | parent_attr_table | ) |
|
|
override |
DAP4 to DAP2 transform.
Return a DAP2 'copy' of the variable.
NOTE: This little bit of magic ensures that the DAP4 shenanigans in which UInt8, Char , and Byte are synonymous is reduced to the DAP2 simplicity of Byte.
- Parameters
-
| root | The root group that should hold this new variable. Add Group-level stuff here (e.g., D4Dimensions). |
| container | Add the new variable to this container. |
- Returns
- A pointer to the transformed variable
Definition at line 302 of file Byte.cc.
◆ val2buf()
| unsigned int libdap::Byte::val2buf |
( |
void * | val, |
|
|
bool | reuse = false ) |
|
override |
Store the value referenced by val in the object's internal buffer. reuse has no effect because this class does not dynamically allocate storage for the internal buffer.
- Returns
- The size (in bytes) of the value's representation.
Definition at line 172 of file Byte.cc.
◆ value()
| dods_byte libdap::Byte::value |
( |
| ) |
const |
|
virtual |
Get the value of this instance.
- Returns
- The value.
Definition at line 212 of file Byte.cc.
◆ width()
| unsigned int libdap::Byte::width |
( |
bool | = false | ) |
const |
|
inlineoverride |
◆ width_ll()
| int64_t libdap::Byte::width_ll |
( |
bool | = false | ) |
const |
|
inlineoverride |
◆ d_buf
| dods_byte libdap::Byte::d_buf |
|
protected |
The documentation for this class was generated from the following files: