26 #define _d4_opaque_h 1
53 d_buf = copy_from.
d_buf;
60 virtual unsigned int width(
bool =
false)
const {
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");
79 virtual unsigned int val2buf(
void *val,
bool reuse =
false);
80 virtual unsigned int buf2val(
void **val);
83 virtual dods_opaque
value()
const;
85 virtual void print_val(FILE *, std::string =
"",
bool =
true) {
86 throw InternalErr(__FILE__, __LINE__,
"Unimplemented method");
88 virtual void print_val(std::ostream &out, std::string space =
"",
bool print_decl_p =
true);
93 throw InternalErr(__FILE__, __LINE__,
"Unimplemented method");
96 virtual void dump(std::ostream &strm)
const ;
101 #endif // _d4_opaque_h
abstract base class used to unmarshall/deserialize dap data objects
virtual BaseType * ptr_duplicate()
virtual unsigned int buf2val(void **val)
Reads the class data.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual bool deserialize(UnMarshaller &, DDS *, bool=false)
Receive data from the net.
Read data from the stream made by D4StreamMarshaller.
virtual void compute_checksum(Crc32 &checksum)
include the data for this variable in the checksum DAP4 includes a checksum with every data response...
D4Opaque(const std::string &n, const std::string &d)
D4Opaque(const std::string &n)
A class for software fault reporting.
std::vector< uint8_t > dods_opaque
virtual bool serialize(ConstraintEvaluator &, DDS &, Marshaller &, bool=true)
Move data to the net.
Marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using DAP4's receiv...
virtual bool set_value(const dods_opaque &value)
virtual int length() const
How many elements are in this variable.
virtual bool ops(BaseType *, int)
Evaluate relational operators.
virtual unsigned int val2buf(void *val, bool reuse=false)
Loads class data.
Evaluate a constraint expression.
D4Opaque & operator=(const D4Opaque &rhs)
The basic data type for the DODS DAP types.
abstract base class used to marshal/serialize dap data objects
virtual void print_val(FILE *, std::string="", bool=true)
D4Opaque(const D4Opaque ©_from)
virtual dods_opaque value() const
virtual unsigned int width(bool=false) const
How many bytes does this use Return the number of bytes of storage this variable uses. For scalar types, this is pretty simple (an int32 uses 4 bytes, etc.). For arrays and Constructors, it is a bit more complex. Note that a scalar String variable uses sizeof(String*) bytes, not the length of the string. In other words, the value returned is independent of the type. Also note width() of a String array returns the number of elements in the array times sizeof(String*). That is, each different array size is a different data type.