27 #include <InternalErr.h> 29 #include "CacheUnMarshaller.h" 31 using namespace libdap;
35 void CacheUnMarshaller::get_byte(dods_byte &val)
37 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
40 void CacheUnMarshaller::get_int16(dods_int16 &val)
42 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
45 void CacheUnMarshaller::get_int32(dods_int32 &val)
47 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
50 void CacheUnMarshaller::get_float32(dods_float32 &val)
52 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
55 void CacheUnMarshaller::get_float64(dods_float64 &val)
57 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
60 void CacheUnMarshaller::get_uint16(dods_uint16 &val)
62 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
65 void CacheUnMarshaller::get_uint32(dods_uint32 &val)
67 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
70 void CacheUnMarshaller::get_str(
string &val)
73 d_in.read(reinterpret_cast<char*>(&len),
sizeof(
size_t));
75 d_in.read(&val[0], len);
78 void CacheUnMarshaller::get_url(
string &val)
93 d_in.read(val, bytes);
97 void CacheUnMarshaller::get_int(
int &val)
99 d_in.read(reinterpret_cast<char*>(&val),
sizeof(val));
108 void CacheUnMarshaller::get_vector(
char **val,
unsigned int &bytes, Vector &)
110 d_in.read(*val, bytes);
113 void CacheUnMarshaller::get_vector(
char **val,
unsigned int &num,
int width, Vector &)
115 d_in.read(*val, num * width);
118 void CacheUnMarshaller::dump(ostream &strm)
const 120 strm << DapIndent::LMarg <<
"CacheUnMarshaller::dump - (" << (
void *)
this <<
")" << endl;
virtual void get_opaque(char *val, unsigned int len)
Get bytes; assume the caller knows what they are doing The get_opaque() and put_opaque() methods of U...