Holds character string data.
More...
#include <Str.h>
|
| unsigned int | buf2val (void **val) override |
| 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 *dds, bool reuse=false) override |
| void | dump (ostream &strm) const override |
| | dumps information about this object
|
| virtual string | esc_string_variable_value (const string &s) |
| | Escape non-printable characters and quotes from a Str variable value. The value printed is used mostly for debugging and for other diagnostics. Strings an non-printable characters are escaped using a backslash.
|
| int | length () const override |
| int64_t | length_ll () const override |
| Str & | operator= (const Str &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=true) override |
| void | serialize (D4StreamMarshaller &m, DMR &dmr, bool filter=false) override |
| | Serialize an Int8.
|
| virtual bool | set_value (const string &value) |
| | Str (const Str ©_from) |
| | Str (const string &n) |
| | Str (const string &n, const string &d) |
| unsigned int | val2buf (void *val, bool reuse=false) override |
| virtual string | value () const |
| unsigned int | width (bool=false) const override |
| int64_t | width_ll (bool=false) const override |
Holds character string data.
- See also
- BaseType
-
Url
Definition at line 61 of file Str.h.
◆ Str() [1/3]
| libdap::Str::Str |
( |
const string & | n | ) |
|
The Str 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 91 of file Str.cc.
◆ Str() [2/3]
The Str server-side constructor accepts the name of the variable and the dataset name from which this instance is created.
- Parameters
-
| n | A string containing the name of the variable to be created. |
| d | A string containing the name of the dataset from which this variable is created |
Definition at line 100 of file Str.cc.
◆ ~Str()
| virtual libdap::Str::~Str |
( |
| ) |
|
|
inlinevirtual |
Definition at line 69 of file Str.h.
◆ Str() [3/3]
| libdap::Str::Str |
( |
const Str & | copy_from | ) |
|
◆ buf2val()
| unsigned int libdap::Str::buf2val |
( |
void ** | val | ) |
|
|
override |
Read the object's value and put a copy in the C++ string object referenced by **val. If *val is null, this method will allocate a string object using new and store the result there. If *val is not null, it will assume that *val references a string object and put the value there.
- Parameters
-
| val | A pointer to null or to a string object. |
- Returns
- The sizeof(string*)
- Exceptions
-
Definition at line 177 of file Str.cc.
◆ compute_checksum()
| void libdap::Str::compute_checksum |
( |
Crc32 & | checksum | ) |
|
|
override |
◆ d4_ops()
| bool libdap::Str::d4_ops |
( |
BaseType * | b, |
|
|
int | op ) |
|
override |
- See also
- BaseType::d4_ops(BaseType *, int)
Definition at line 281 of file Str.cc.
◆ deserialize() [1/2]
◆ deserialize() [2/2]
| bool libdap::Str::deserialize |
( |
UnMarshaller & | um, |
|
|
DDS * | dds, |
|
|
bool | reuse = false ) |
|
override |
◆ dump()
| void libdap::Str::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 311 of file Str.cc.
◆ esc_string_variable_value()
| string libdap::Str::esc_string_variable_value |
( |
const string & | s | ) |
|
|
virtual |
Escape non-printable characters and quotes from a Str variable value. The value printed is used mostly for debugging and for other diagnostics. Strings an non-printable characters are escaped using a backslash.
- Parameters
-
- Returns
- The modified value.
Definition at line 243 of file Str.cc.
◆ length()
| int libdap::Str::length |
( |
| ) |
const |
|
override |
◆ length_ll()
| int64_t libdap::Str::length_ll |
( |
| ) |
const |
|
override |
◆ operator=()
| Str & libdap::Str::operator= |
( |
const Str & | rhs | ) |
|
◆ ops()
| bool libdap::Str::ops |
( |
BaseType * | b, |
|
|
int | op ) |
|
override |
◆ print_val() [1/2]
| void libdap::Str::print_val |
( |
FILE * | out, |
|
|
string | space = "", |
|
|
bool | print_decl_p = true ) |
|
override |
◆ print_val() [2/2]
| void libdap::Str::print_val |
( |
ostream & | out, |
|
|
string | space = "", |
|
|
bool | print_decl_p = true ) |
|
override |
◆ ptr_duplicate()
| BaseType * libdap::Str::ptr_duplicate |
( |
| ) |
|
|
override |
◆ serialize() [1/2]
◆ serialize() [2/2]
Serialize an Int8.
- 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 159 of file Str.cc.
◆ set_value()
| bool libdap::Str::set_value |
( |
const string & | 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 219 of file Str.cc.
◆ val2buf()
| unsigned int libdap::Str::val2buf |
( |
void * | val, |
|
|
bool | reuse = false ) |
|
override |
Store the value referenced by val in this object. Even though the type of val is void*, this method assumes the type is string*. Note that the value is copied so the caller if free to throw away/reuse the actual parameter once this call has returned.
- Parameters
-
| val | A pointer to a C++ string object. |
| reuse | Not used by this version of the method. |
- Exceptions
-
| IntenalErr | if val is null. |
- Returns
- The width of the pointer.
Definition at line 202 of file Str.cc.
◆ value()
| string libdap::Str::value |
( |
| ) |
const |
|
virtual |
Get the value of this instance.
- Returns
- The value.
Definition at line 228 of file Str.cc.
◆ width()
| unsigned int libdap::Str::width |
( |
bool | = false | ) |
const |
|
inlineoverride |
Definition at line 77 of file Str.h.
◆ width_ll()
| int64_t libdap::Str::width_ll |
( |
bool | = false | ) |
const |
|
inlineoverride |
Definition at line 79 of file Str.h.
◆ d_buf
Definition at line 63 of file Str.h.
The documentation for this class was generated from the following files: