52#include "InternalErr.h"
54#include "dods-datatypes.h"
66class ConstraintEvaluator;
78class D4StreamMarshaller;
79class D4StreamUnMarshaller;
143 bool d_is_synthesized;
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);
163 void dump(ostream &strm)
const override;
181 virtual bool is_dap4()
const {
return d_is_dap4; }
182 virtual void set_is_dap4(
const bool v) { d_is_dap4 = v;}
192 virtual string name()
const;
193 virtual void set_name(
const string &n);
194 virtual std::string
FQN()
const;
200 virtual string dataset()
const ;
281 virtual BaseType *
var(
const string &
name =
"",
bool exact_match =
true, btp_stack *s =
nullptr);
285 virtual void add_var_nocopy(
BaseType *bt,
Part part = nil);
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);
330 virtual unsigned int width(
bool constrained =
false) = 0;
383 virtual unsigned int val2buf(
void *val,
bool reuse =
false) = 0;
570 virtual void print_val(FILE *out,
string space =
"",
571 bool print_decl_p =
true);
588 bool print_decl_p =
true) = 0;
Contains the attributes for a dataset.
The basic data type for the DODS DAP types.
void m_duplicate(const BaseType &bt)
Perform a deep copy.
virtual void print_xml_writer(XMLWriter &xml, bool constrained=false)
virtual string type_name() const
Returns the type of the class instance as a string.
virtual void intern_data()
Read data into this variable.
virtual bool read()
Read data into a local buffer.
virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse=false)
Receive data from the net.
virtual AttrTable & get_attr_table()
virtual string name() const
Returns the name of the class instance.
virtual void set_in_selection(bool state)
virtual void print_decl(FILE *out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false)
Print an ASCII representation of the variable structure.
virtual BaseType * get_parent() const
virtual bool read_p()
Has this variable been read?
virtual unsigned int width(bool constrained=false) const
How many bytes does this variable use Return the number of bytes of storage this variable uses....
virtual void set_read_p(bool state)
Sets the value of the read_p property.
virtual string dataset() const
Returns the name of the dataset used to create this instance.
virtual void set_length(int)
Set the number of elements for this variable.
virtual bool d4_ops(BaseType *b, int op)
Evaluator a relop for DAP4.
virtual void set_attr_table(const AttrTable &at)
virtual void set_synthesized_p(bool state)
virtual void set_parent(BaseType *parent)
virtual int element_count(bool leaves=false)
Count the members of constructor types.
void dump(ostream &strm) const override
dumps information about this object
virtual string toString()
virtual bool is_vector_type() const
Returns true if the instance is a vector (i.e., array) type variable.
virtual void print_xml(FILE *out, string space=" ", bool constrained=false)
virtual void set_name(const string &n)
Sets the name of the class instance.
virtual bool ops(BaseType *b, int op)
Evaluate relational operators.
virtual bool is_constructor_type() const
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable.
virtual void print_val(ostream &out, string space="", bool print_decl_p=true)=0
Prints the value of the variable.
virtual D4Attributes * attributes()
virtual std::string FQN() const
virtual bool send_p()
Should this variable be sent?
virtual int length() const
How many elements are in this variable.
virtual void clear_local_data()
virtual bool is_simple_type() const
Returns true if the instance is a numeric, string or URL type variable.
virtual void set_send_p(bool state)
virtual BaseType * ptr_duplicate()=0
virtual unsigned int val2buf(void *val, bool reuse=false)=0
Loads class data.
virtual unsigned int buf2val(void **val)=0
Reads the class data.
virtual void compute_checksum(Crc32 &checksum)=0
include the data for this variable in the checksum DAP4 includes a checksum with every data response....
virtual void transform_to_dap4(D4Group *root, Constructor *container)
DAP2 to DAP4 transform.
virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true)
Move data to the net, then remove them from the object.
virtual void add_var(BaseType *bt, Part part=nil)
Add a variable.
virtual void transfer_attributes(AttrTable *at)
virtual bool is_in_selection()
Is this variable part of the current selection?
virtual bool synthesized_p()
virtual bool check_semantics(string &msg, bool all=false)
Compare an object's current state with the semantics of its type.
BaseType(const string &n, const Type &t, bool is_dap4=false)
The BaseType constructor.
virtual BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=nullptr)
Returns a pointer to a member of a constructor class.
virtual void set_type(const Type &t)
Sets the type of the class instance.
virtual Type type() const
Returns the type of the class instance.
virtual void print_val(FILE *out, string space="", bool print_decl_p=true)
Prints the value of the variable.
virtual void print_dap4(XMLWriter &xml, bool constrained=false)
virtual std::vector< BaseType * > * transform_to_dap2(AttrTable *parent_attr_table)
DAP4 to DAP2 transform.
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.
libdap base object for common functionality of libdap objects
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
Type
Identifies the data type.
Part
Names the parts of multi-section constructor data types.