57 #include "Structure.h"
63 #include "D4StreamMarshaller.h"
64 #include "D4StreamUnMarshaller.h"
68 #include "Operators.h"
69 #include "dods-limits.h"
71 #include "InternalErr.h"
72 #include "DapIndent.h"
107 d_buf = copy_from.d_buf;
113 return new Int64(*
this);
118 DBG(cerr <<
"~Int64" << endl);
122 Int64::operator=(
const Int64 &rhs)
127 dynamic_cast<BaseType &>(*
this) = rhs;
137 return sizeof(dods_int64);
143 checksum.
AddData(reinterpret_cast<uint8_t*>(&d_buf),
sizeof(d_buf));
160 m.put_int64( d_buf ) ;
166 um.get_int64( d_buf ) ;
176 Int64::set_value(dods_int64 i)
184 void Int64::print_val(ostream &out,
string space,
bool print_decl_p)
188 out <<
" = " << d_buf <<
";\n";
199 throw InternalErr(__FILE__, __LINE__,
"This value not read!");
203 throw InternalErr(__FILE__, __LINE__,
"This value not read!");
215 return Cmp<dods_int64, dods_int8>(op, d_buf, static_cast<Int8*>(b)->value());
217 return SUCmp<dods_int64, dods_byte>(op, d_buf, static_cast<Byte*>(b)->value());
219 return Cmp<dods_int64, dods_int16>(op, d_buf, static_cast<Int16*>(b)->value());
221 return SUCmp<dods_int64, dods_uint16>(op, d_buf, static_cast<UInt16*>(b)->value());
223 return Cmp<dods_int64, dods_int32>(op, d_buf, static_cast<Int32*>(b)->value());
225 return SUCmp<dods_int64, dods_uint32>(op, d_buf, static_cast<UInt32*>(b)->value());
227 return Cmp<dods_int64, dods_int64>(op, d_buf, static_cast<Int64*>(b)->value());
229 return SUCmp<dods_int64, dods_uint64>(op, d_buf, static_cast<UInt64*>(b)->value());
231 return Cmp<dods_int64, dods_float32>(op, d_buf, static_cast<Float32*>(b)->value());
233 return Cmp<dods_int64, dods_float64>(op, d_buf, static_cast<Float64*>(b)->value());
236 throw Error(malformed_expr,
"Relational operators can only compare compatible types (number, string).");
238 throw Error(malformed_expr,
"Relational operators only work with scalar types.");
257 dest->set_is_dap4(
false);
276 strm << DapIndent::LMarg <<
"Int64::dump - ("
277 << (
void *)
this <<
")" << endl ;
278 DapIndent::Indent() ;
280 strm << DapIndent::LMarg <<
"value: " << d_buf << endl ;
281 DapIndent::UnIndent() ;