49 #ifndef _constructor_h 50 #include "Constructor.h" 53 #ifndef base_type_factory_h 54 #include "BaseTypeFactory.h" 66 #include "Keywords2.h" 70 #include "XMLWriter.h" 187 string d_container_name;
193 string d_dap_version;
194 string d_request_xml_base;
199 vector<BaseType *> vars;
206 long d_max_response_size;
208 friend class DDSTest;
211 void duplicate(
const DDS &dds);
212 BaseType *leaf_match(
const string &name, BaseType::btp_stack *s = 0);
213 BaseType *exact_match(
const string &name, BaseType::btp_stack *s = 0);
216 typedef std::vector<BaseType *>::const_iterator Vars_citer ;
217 typedef std::vector<BaseType *>::iterator Vars_iter ;
218 typedef std::vector<BaseType *>::reverse_iterator Vars_riter ;
226 DDS & operator=(
const DDS &rhs);
266 string get_dap_version()
const {
return d_dap_version; }
267 string get_dmr_version()
const {
return "1.0"; }
276 Keywords &get_keywords() {
return d_keywords; }
311 BaseType *
var(
const string &n, BaseType::btp_stack &s);
312 BaseType *
var(
const string &n, BaseType::btp_stack *s = 0);
318 Vars_citer var_cbegin()
const {
return vars.cbegin(); }
326 Vars_citer var_cend()
const {
return vars.cend(); }
341 void del_var(Vars_iter i1, Vars_iter i2);
350 void set_timeout(
int t);
355 void parse(
string fname);
357 void parse(FILE *in = stdin);
360 void print(FILE *out);
362 void print_xml(FILE *out,
bool constrained,
const string &blob =
"");
365 void print(ostream &out);
367 void print_xml(ostream &out,
bool constrained,
const string &blob =
"");
370 void print_xml_writer(ostream &out,
bool constrained,
const string &blob =
"");
373 void print_dmr(ostream &out,
bool constrained);
378 bool mark(
const string &name,
bool state);
383 virtual void dump(ostream &strm)
const ;
void print(FILE *out)
Print the entire DDS to the specified file.
void insert_var_nocopy(Vars_iter i, BaseType *ptr)
Contains the attributes for a dataset.
Vars_iter get_vars_iter(int i)
Get an iterator.
void set_response_limit(long size)
void insert_var(Vars_iter i, BaseType *ptr)
Insert a variable before the referenced element.
Vars_iter var_begin()
Return an iterator to the first variable.
long get_response_limit()
Get the maximum response size, in KB. Zero indicates no limit.
DDS(BaseTypeFactory *factory, const string &name="")
int get_request_size(bool constrained)
Get the estimated response size.
BaseType * var(const string &n, BaseType::btp_stack &s)
virtual void transfer_attributes(DAS *das)
void print_xml(FILE *out, bool constrained, const string &blob="")
void print_xml_writer(ostream &out, bool constrained, const string &blob="")
void add_var_nocopy(BaseType *bt)
Adds the variable to the DDS.
Holds a structure (aggregate) type.
Vars_riter var_rend()
Return a reverse iterator.
string get_dataset_name() const
int num_var()
Returns the number of variables in the DDS.
bool mark(const string &name, bool state)
Mark the send_p flag of the named variable to state.
void parse(string fname)
Parse a DDS from a file with the given d_name.
void mark_all(bool state)
void print_das(ostream &out)
void print_dmr(ostream &out, bool constrained)
virtual AttrTable & get_attr_table()
BaseType * get_var_index(int i)
Get a variable.
bool check_semantics(bool all=false)
Check the semantics of each of the variables represented in the DDS.
int get_dap_major() const
Get the DAP major version as sent by the client.
string get_request_xml_base() const
Get the URL that will return this DDS/DDX/DataThing.
virtual void dump(ostream &strm) const
dumps information about this object
string get_namespace() const
Get the namespace associated with the DDS - likely set only by DDX responses.
BaseTypeFactory * set_factory(BaseTypeFactory *factory)
Vars_iter var_end()
Return an iterator.
void set_namespace(const string &ns)
Set the namespace for this DDS/DDX object/response.
void tag_nested_sequences()
Traverse DDS, set Sequence leaf nodes.
void set_dap_minor(int p)
void set_dataset_name(const string &n)
The basic data type for the DODS DAP types.
libdap base object for common functionality of libdap objects
void del_var(const string &n)
Removes a variable from the DDS.
Vars_riter var_rbegin()
Return a reverse iterator.
Hold attribute data for a DAP2 dataset.
BaseTypeFactory * get_factory() const
int get_dap_minor() const
Get the DAP minor version as sent by the client.
void set_dap_major(int p)
void print_constrained(FILE *out)
Print a constrained DDS to the specified file.
void set_dap_version(const string &version_string="2.0")
void add_var(BaseType *bt)
Adds a copy of the variable to the DDS. Using the ptr_duplicate() method, perform a deep copy on the ...
void set_request_xml_base(const string &xb)