50 #include "AttrTable.h" 52 #include "InternalErr.h" 54 #include "dods-datatypes.h" 66 class ConstraintEvaluator;
78 class D4StreamMarshaller;
79 class D4StreamUnMarshaller;
144 bool d_is_synthesized;
146 void m_duplicate(
const BaseType &bt);
149 typedef stack<BaseType *> btp_stack;
152 BaseType(
const string &n,
const Type &t,
bool is_dap4 =
false);
153 BaseType(
const string &n,
const string &d,
const Type &t,
bool is_dap4 =
false);
158 virtual string toString();
161 virtual std::vector<BaseType *> *transform_to_dap2(
AttrTable *parent_attr_table);
163 virtual void dump(ostream &strm)
const ;
181 virtual bool is_dap4()
const {
return d_is_dap4; }
182 virtual void set_is_dap4(
const bool v) { d_is_dap4 = v;}
190 virtual BaseType *ptr_duplicate() = 0;
192 virtual string name()
const;
193 virtual void set_name(
const string &n);
194 virtual std::string FQN()
const;
196 virtual Type type()
const;
197 virtual void set_type(
const Type &t);
200 virtual string dataset()
const ;
220 virtual bool synthesized_p();
221 virtual void set_synthesized_p(
bool state);
223 virtual int element_count(
bool leaves =
false);
225 virtual bool read_p();
226 virtual void set_read_p(
bool state);
228 virtual bool send_p();
229 virtual void set_send_p(
bool state);
232 virtual void set_attr_table(
const AttrTable &at);
239 virtual bool is_in_selection();
240 virtual void set_in_selection(
bool state);
242 virtual void set_parent(
BaseType *parent);
243 virtual BaseType *get_parent()
const;
245 virtual void transfer_attributes(
AttrTable *at);
281 virtual BaseType *var(
const string &name =
"",
bool exact_match =
true, btp_stack *s = 0);
282 virtual BaseType *var(
const string &name, btp_stack &s);
285 virtual void add_var_nocopy(
BaseType *bt,
Part part = nil);
289 virtual bool check_semantics(
string &msg,
bool all =
false);
291 virtual bool ops(
BaseType *b,
int op);
292 virtual bool d4_ops(
BaseType *b,
int op);
294 virtual unsigned int width(
bool constrained =
false)
const;
296 virtual void print_decl(FILE *out,
string space =
" ",
297 bool print_semi =
true,
298 bool constraint_info =
false,
299 bool constrained =
false);
301 virtual void print_xml(FILE *out,
string space =
" ",
302 bool constrained =
false);
304 virtual void print_decl(ostream &out,
string space =
" ",
305 bool print_semi =
true,
306 bool constraint_info =
false,
307 bool constrained =
false);
309 virtual void print_xml(ostream &out,
string space =
" ",
310 bool constrained =
false);
312 virtual void print_xml_writer(
XMLWriter &xml,
bool constrained =
false);
314 virtual void print_dap4(
XMLWriter &xml,
bool constrained =
false);
330 virtual unsigned int width(
bool constrained =
false) = 0;
352 virtual unsigned int buf2val(
void **val) = 0;
383 virtual unsigned int val2buf(
void *val,
bool reuse =
false) = 0;
468 return serialize(eval, dds, m, ce_eval);
478 virtual void compute_checksum(
Crc32 &checksum) = 0;
480 virtual void intern_data();
517 serialize(m, dmr, filter);
545 virtual bool deserialize(
UnMarshaller &um,
DDS *dds,
bool reuse =
false);
570 virtual void print_val(FILE *out,
string space =
"",
571 bool print_decl_p =
true);
587 virtual void print_val(ostream &out,
string space =
"",
588 bool print_decl_p =
true) = 0;
594 #endif // _basetype_h virtual int length() const
How many elements are in this variable.
abstract base class used to unmarshall/deserialize dap data objects
Part
Names the parts of multi-section constructor data types.
bool is_constructor_type(Type t)
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable...
Contains the attributes for a dataset.
Read data from the stream made by D4StreamMarshaller.
bool is_vector_type(Type t)
Returns true if the instance is a vector (i.e., array) type variable.
Type
Identifies the data type.
top level DAP object to house generic methods
virtual void clear_local_data()
Marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using DAP4's receiv...
bool is_simple_type(Type t)
Returns true if the instance is a numeric, string or URL type variable.
virtual void set_length(int)
Set the number of elements for this variable.
Evaluate a constraint expression.
The basic data type for the DODS DAP types.
libdap base object for common functionality of libdap objects
abstract base class used to marshal/serialize dap data objects