31#include "InternalErr.h"
39 typedef std::vector<uint8_t> dods_opaque;
45 D4Opaque(
const std::string &n) :
BaseType(n, dods_opaque_c,
true ), d_buf(0) {}
46 D4Opaque(
const std::string &n,
const std::string &d) :
BaseType(n, d, dods_opaque_c,
true ), d_buf(0) {}
48 virtual ~D4Opaque() {}
50 D4Opaque(
const D4Opaque ©_from) :
BaseType(copy_from) { d_buf = copy_from.d_buf; }
52 D4Opaque &operator=(
const D4Opaque &rhs);
58 unsigned int width(
bool =
false)
const override {
return sizeof(vector<uint8_t>); }
60 int64_t width_ll(
bool =
false)
const override {
return sizeof(vector<uint8_t>); }
64 virtual int length()
const {
return d_buf.size(); }
68 throw InternalErr(__FILE__, __LINE__,
"Unimplemented method");
71 throw InternalErr(__FILE__, __LINE__,
"Unimplemented method");
82 unsigned int val2buf(
void *val,
bool reuse =
false)
override;
83 unsigned int buf2val(
void **val)
override;
86 virtual dods_opaque
value()
const;
88 void print_val(FILE *, std::string =
"",
bool =
true)
override {
89 throw InternalErr(__FILE__, __LINE__,
"Unimplemented method");
91 void print_val(std::ostream &out, std::string space =
"",
bool print_decl_p =
true)
override;
99 void dump(std::ostream &strm)
const override;
Contains the attributes for a dataset.
BaseType(const string &n, const Type &t, bool is_dap4=false)
The BaseType constructor.
Evaluate a constraint expression.
bool ops(BaseType *, int) override
Evaluate relational operators.
unsigned int width(bool=false) const override
How many bytes does this variable use Return the number of bytes of storage this variable uses....
virtual void clear_local_data()
std::vector< BaseType * > * transform_to_dap2(AttrTable *parent_attr_table) override
DAP4 to DAP2 transform.
virtual int length() const
How many elements are in this variable? Uses -1 in places.
void print_val(FILE *, std::string="", bool=true) override
Prints the value of the variable.
void dump(std::ostream &strm) const override
dumps information about this object
BaseType * ptr_duplicate() override
void compute_checksum(Crc32 &checksum) override
include the data for this variable in the checksum DAP4 includes a checksum with every data response....
virtual dods_opaque value() const
unsigned int buf2val(void **val) override
Reads the class data.
unsigned int val2buf(void *val, bool reuse=false) override
Loads class data.
bool deserialize(UnMarshaller &, DDS *, bool=false) override
Receive data from the net.
virtual bool set_value(const dods_opaque &value)
bool serialize(ConstraintEvaluator &, DDS &, Marshaller &, bool=true) override
Move data to the net, then remove them from the object.
Marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using DAP4's receiv...
Read data from the stream made by D4StreamMarshaller.
A class for software fault reporting.
abstract base class used to marshal/serialize dap data objects
abstract base class used to unmarshall/deserialize dap data objects
top level DAP object to house generic methods