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();
162 virtual void dump(ostream &strm)
const ;
180 virtual bool is_dap4()
const {
return d_is_dap4; }
181 virtual void set_is_dap4(
const bool v) { d_is_dap4 = v;}
189 virtual BaseType *ptr_duplicate() = 0;
191 virtual string name()
const;
192 virtual void set_name(
const string &n);
193 virtual std::string FQN()
const;
195 virtual Type type()
const;
196 virtual void set_type(
const Type &t);
199 virtual string dataset()
const ;
219 virtual bool synthesized_p();
220 virtual void set_synthesized_p(
bool state);
222 virtual int element_count(
bool leaves =
false);
224 virtual bool read_p();
225 virtual void set_read_p(
bool state);
227 virtual bool send_p();
228 virtual void set_send_p(
bool state);
231 virtual void set_attr_table(
const AttrTable &at);
238 virtual bool is_in_selection();
239 virtual void set_in_selection(
bool state);
241 virtual void set_parent(
BaseType *parent);
242 virtual BaseType *get_parent()
const;
244 virtual void transfer_attributes(
AttrTable *at);
280 virtual BaseType *var(
const string &name =
"",
bool exact_match =
true, btp_stack *s = 0);
281 virtual BaseType *var(
const string &name, btp_stack &s);
284 virtual void add_var_nocopy(
BaseType *bt,
Part part = nil);
288 virtual bool check_semantics(
string &msg,
bool all =
false);
290 virtual bool ops(
BaseType *b,
int op);
291 virtual bool d4_ops(
BaseType *b,
int op);
293 virtual unsigned int width(
bool constrained =
false)
const;
295 virtual void print_decl(FILE *out,
string space =
" ",
296 bool print_semi =
true,
297 bool constraint_info =
false,
298 bool constrained =
false);
300 virtual void print_xml(FILE *out,
string space =
" ",
301 bool constrained =
false);
303 virtual void print_decl(ostream &out,
string space =
" ",
304 bool print_semi =
true,
305 bool constraint_info =
false,
306 bool constrained =
false);
308 virtual void print_xml(ostream &out,
string space =
" ",
309 bool constrained =
false);
311 virtual void print_xml_writer(
XMLWriter &xml,
bool constrained =
false);
313 virtual void print_dap4(
XMLWriter &xml,
bool constrained =
false);
329 virtual unsigned int width(
bool constrained =
false) = 0;
351 virtual unsigned int buf2val(
void **val) = 0;
382 virtual unsigned int val2buf(
void *val,
bool reuse =
false) = 0;
467 return serialize(eval, dds, m, ce_eval);
477 virtual void compute_checksum(
Crc32 &checksum) = 0;
479 virtual void intern_data();
516 serialize(m, dmr, filter);
544 virtual bool deserialize(
UnMarshaller &um,
DDS *dds,
bool reuse =
false);
569 virtual void print_val(FILE *out,
string space =
"",
570 bool print_decl_p =
true);
586 virtual void print_val(ostream &out,
string space =
"",
587 bool print_decl_p =
true) = 0;
593 #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.
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