57#include "Marshaller.h"
58#include "UnMarshaller.h"
60#include "D4StreamMarshaller.h"
61#include "D4StreamUnMarshaller.h"
65#include "InternalErr.h"
67#include "dods-limits.h"
102 BaseType::operator=(rhs);
108#if USE_LOCAL_TIMEOUT_SCHEME
114 if (ce_eval && !eval.eval_selection(dds,
dataset()))
116#if USE_LOCAL_TIMEOUT_SCHEME
119 m.put_float64(d_buf);
125 um.get_float64(d_buf);
130void Float64::compute_checksum(Crc32 &checksum) {
131 checksum.
AddData(
reinterpret_cast<uint8_t *
>(&d_buf),
sizeof(d_buf));
146 m.put_float64(d_buf);
151unsigned int Float64::val2buf(
void *val,
bool) {
157 throw InternalErr(__FILE__, __LINE__,
"The incoming pointer does not contain any data.");
159 d_buf = *(dods_float64 *)val;
164unsigned int Float64::buf2val(
void **val) {
168 throw InternalErr(__FILE__, __LINE__,
"NULL pointer.");
171 *val =
new dods_float64;
173 *(dods_float64 *)*val = d_buf;
185bool Float64::set_value(dods_float64 val) {
192void Float64::print_val(FILE *out,
string space,
bool print_decl_p) {
194 print_val(oss, space, print_decl_p);
195 fwrite(oss.str().data(),
sizeof(
char), oss.str().length(), out);
198void Float64::print_val(ostream &out,
string space,
bool print_decl_p) {
200 std::streamsize prec = out.precision(15);
203 print_decl(out, space,
false);
204 out <<
" = " << d_buf <<
";\n";
212bool Float64::ops(BaseType *b,
int op) {
214 if (!
read_p() && !read()) {
220 throw InternalErr(__FILE__, __LINE__,
"This value not read!");
224 if (!b || !(b->read_p() || b->read())) {
230 throw InternalErr(__FILE__, __LINE__,
"This value not read!");
233 return d4_ops(b, op);
236bool Float64::d4_ops(BaseType *b,
int op) {
237 DBG(cerr <<
"b->typename(): " << b->type_name() << endl);
267 throw Error(malformed_expr,
"Relational operators can only compare compatible types (number, string).");
269 throw Error(malformed_expr,
"Relational operators only work with scalar types.");
281 strm << DapIndent::LMarg <<
"Float64::dump - (" << (
void *)
this <<
")" << endl;
283 BaseType::dump(strm);
284 strm << DapIndent::LMarg <<
"value: " << d_buf << endl;
285 DapIndent::UnIndent();
void AddData(const uint8_t *pData, const uint32_t length)
Evaluate a constraint expression.
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.
Holds a 64-bit (double precision) floating point value.
void dump(ostream &strm) const override
dumps information about this object
virtual dods_float64 value() const
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
virtual bool read_p()
Has this variable been read?
bool Cmp(int op, T1 v1, T2 v2)
virtual string dataset() const
Returns the name of the dataset used to create this instance.