46 #ifndef constraint_evaluator_h
89 vector<BaseType *> d_compound_buf;
94 unsigned int d_capacity;
117 virtual bool is_dap2_only_type();
130 virtual unsigned int width(
bool constrained =
false)
const;
132 virtual int length()
const;
147 virtual unsigned int val2buf(
void *val,
bool reuse =
false);
148 virtual unsigned int buf2val(
void **val);
163 template <
typename T>
bool set_value(T *v,
int sz);
164 template <
typename T>
bool set_value(vector<T> &v,
int sz);
167 virtual bool set_value(vector<dods_byte> &val,
int sz);
170 virtual bool set_value(vector<dods_int8> &val,
int sz);
173 virtual bool set_value(vector<dods_int16> &val,
int sz);
176 virtual bool set_value(vector<dods_uint16> &val,
int sz);
179 virtual bool set_value(vector<dods_int32> &val,
int sz);
182 virtual bool set_value(vector<dods_uint32> &val,
int sz);
185 virtual bool set_value(vector<dods_int64> &val,
int sz);
188 virtual bool set_value(vector<dods_uint64> &val,
int sz);
191 virtual bool set_value(vector<dods_float32> &val,
int sz);
194 virtual bool set_value(vector<dods_float64> &val,
int sz);
196 virtual bool set_value(
string *val,
int sz);
197 virtual bool set_value(vector<string> &val,
int sz);
199 template <
typename T>
void value(T *v)
const;
212 virtual void value(vector<string> &b)
const;
214 template <
typename T>
void value(vector<unsigned int> *indices, T *b)
const;
225 void value(vector<unsigned int> *index, vector<string> &b)
const;
227 virtual void *
value();
238 virtual void dump(ostream &strm)
const ;
abstract base class used to unmarshall/deserialize dap data objects
virtual void add_var_nocopy(BaseType *v, Part p=nil)
virtual unsigned int get_value_capacity() const
void set_vec(unsigned int i, BaseType *val)
Sets element i to value val.
Part
Names the parts of multi-section constructor data types.
virtual BaseType * prototype() const
Holds a one-dimensional collection of DAP2 data types.
virtual void dump(ostream &strm) const
dumps information about this object
Read data from the stream made by D4StreamMarshaller.
virtual int length() const
virtual void compute_checksum(Crc32 &checksum)
include the data for this variable in the checksum DAP4 includes a checksum with every data response...
virtual void set_read_p(bool state)
Indicates that the data is ready to send.
virtual void add_var(BaseType *v, Part p=nil)
Add the BaseType pointer to this constructor type instance.
virtual int element_count(bool leaves)
Count the members of constructor types.
void m_set_cardinal_values_internal(const CardType *fromArray, int numElts)
virtual unsigned int set_value_slice_from_row_major_vector(const Vector &rowMajorData, unsigned int startElement)
Type
Identifies the data type.
stack< BaseType * > btp_stack
virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true)
Serialize a Vector.
virtual BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=0)
virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse=false)
Receive data from the net.
bool set_value(T *v, int sz)
set the value of a byte array
Marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using DAP4's receiv...
void set_vec_nocopy(unsigned int i, BaseType *val)
Sets element i to value val.
bool m_is_cardinal_type() const
virtual void reserve_value_capacity()
Vector & operator=(const Vector &rhs)
Vector(const string &n, BaseType *v, const Type &t, bool is_dap4=false)
The Vector constructor.
virtual unsigned int val2buf(void *val, bool reuse=false)
Reads data into the Vector buffer. Thrown if called for Structure, Sequence or Grid.
virtual bool check_semantics(string &msg, bool all=false)
Compare an object's current state with the semantics of its type.
void m_delete_cardinal_data_buffer()
string name() const
Returns the name of the class instance.
Evaluate a constraint expression.
virtual BaseType * ptr_duplicate()=0
virtual void set_send_p(bool state)
Indicates that the data is ready to send.
unsigned int m_create_cardinal_data_buffer_for_type(unsigned int numEltsOfType)
The basic data type for the DODS DAP types.
abstract base class used to marshal/serialize dap data objects
virtual void set_name(const std::string &name)
void m_duplicate(const Vector &v)
virtual unsigned int buf2val(void **val)
virtual void set_length(int l)
virtual void intern_data(ConstraintEvaluator &eval, DDS &dds)
read data into a variable for later use
virtual unsigned int width(bool constrained=false) const
Returns the width of the data, in bytes.