|
| 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 variable bt and adds the result to this DDS.
|
| void | add_var_nocopy (BaseType *bt) |
| | Adds the variable to the DDS.
|
| bool | check_semantics (bool all=false) |
| | Check the semantics of each of the variables represented in the DDS.
|
| Structure * | container () |
| string | container_name () |
| void | container_name (const string &cn) |
| | DataDDS (BaseTypeFactory *factory, const string &n="", const string &v="", const string &p="") |
| | Make an instance of DataDDS A DataDDS instance is a DDS with additional information about the version of the server from which the data came.
|
| void | del_var (const string &n) |
| | Removes a variable from the DDS.
|
| void | del_var (Vars_iter i) |
| | Removes a variable from the DDS.
|
| void | del_var (Vars_iter i1, Vars_iter i2) |
| | Removes a range of variables from the DDS.
|
| virtual void | dump (ostream &strm) const |
| | dumps information about this object
|
| string | filename () const |
| void | filename (const string &fn) |
| virtual AttrTable & | get_attr_table () |
| int | get_dap_major () const |
| | Get the DAP major version as sent by the client.
|
| int | get_dap_minor () const |
| | Get the DAP minor version as sent by the client.
|
| string | get_dap_version () const |
| DAS * | get_das () |
| | Get a DAS object.
|
| void | get_das (DAS *das) |
| string | get_dataset_name () const |
| string | get_dmr_version () const |
| BaseTypeFactory * | get_factory () const |
| string | get_namespace () const |
| | Get the namespace associated with the DDS - likely set only by DDX responses.
|
| string | get_protocol () const |
| int | get_protocol_major () const |
| int | get_protocol_minor () const |
| int | get_request_size (bool constrained) |
| | Get the estimated response size in bytes.
|
| uint64_t | get_request_size_kb (bool constrained) |
| | Get the estimated response size in kilobytes.
|
| string | get_request_xml_base () const |
| | Get the URL that will return this DDS/DDX/DataThing.
|
| long | get_response_limit () |
| | Get the maximum response size, in bytes. Zero indicates no limit.
|
| uint64_t | get_response_limit_kb () const |
| | The maximum allowed response size, in kilobytes. Zero indicates no limit (default).
|
| BaseType * | get_var_index (int i) |
| | Get a variable.
|
| Vars_iter | get_vars_iter (int i) |
| | Get an iterator.
|
| string | get_version () const |
| | Get the server version string, unparsed.
|
| int | get_version_major () const |
| | Returns the major version number.
|
| int | get_version_minor () const |
| | Returns the minor version number.
|
| void | insert_var (Vars_iter i, BaseType *ptr) |
| | Insert a variable before the referenced element.
|
| void | insert_var_nocopy (Vars_iter i, BaseType *ptr) |
| bool | is_dap4_projected (std::vector< string > &inventory) |
|
bool | mark (const string &name, bool state) |
| void | mark_all (bool state) |
| | Mark the send_p flag of the named variable to state.
|
| int | num_var () |
| | Returns the number of variables in the DDS.
|
| void | parse (FILE *in=stdin) |
| | Parse a DDS from a file indicated by the input file descriptor. Read the persistent representation of a DDS from the FILE *in, parse it and create a matching binary object.
|
| void | parse (int fd) |
| | Parse a DDS from a file indicated by the input file descriptor.
|
| void | parse (string fname) |
| | Parse a DDS from a file with the given d_name.
|
| void | print (FILE *out) |
| | Print the entire DDS to the specified file.
|
| void | print (ostream &out) |
| | Print the entire DDS to the specified ostream.
|
| void | print_constrained (FILE *out) |
| | Print a constrained DDS to the specified file.
|
| void | print_constrained (ostream &out) |
| | Print a constrained DDS to the specified ostream.
|
| void | print_das (ostream &out) |
| | write the DAS response given the attribute information in the DDS
|
| void | print_dmr (ostream &out, bool constrained) |
| | Print the DAP4 DMR object using a DDS.
|
| void | print_xml (FILE *out, bool constrained, const string &blob="") |
| void | print_xml (ostream &out, bool constrained, const string &blob="") |
| void | print_xml_writer (ostream &out, bool constrained, const string &blob="") |
| void | set_dap_major (int p) |
| void | set_dap_minor (int p) |
| void | set_dap_version (const string &version_string="2.0") |
| void | set_dap_version (double d) |
| void | set_dataset_name (const string &n) |
| BaseTypeFactory * | set_factory (BaseTypeFactory *factory) |
| void | set_namespace (const string &ns) |
| | Set the namespace for this DDS/DDX object/response.
|
| void | set_protocol (const string &p) |
| void | set_request_xml_base (const string &xb) |
| void | set_response_limit (long size) |
| void | set_response_limit_kb (uint64_t size) |
| | Set the maximum response size, in kilobytes. The size is given in kilobytes..
|
| void | set_version (const string &v) |
| void | tag_nested_sequences () |
| | Traverse DDS, set Sequence leaf nodes.
|
| bool | too_big () |
| virtual void | transfer_attributes (DAS *das) |
| BaseType * | var (const string &n, BaseType::btp_stack &s) |
| BaseType * | var (const string &n, BaseType::btp_stack *s=0) |
| | Find the variable with the given d_name.
|
| Vars_iter | var_begin () |
| Vars_iter | var_end () |
| | Return an iterator.
|
| Vars_riter | var_rbegin () |
| | Return a reverse iterator.
|
| Vars_riter | var_rend () |
| | Return a reverse iterator.
|
| const vector< BaseType * > & | variables () const |
Old deprecated DDS timeout code - Deprecated
|
| void | timeout_on () |
| void | timeout_off () |
| void | set_timeout (int t) |
| int | get_timeout () |
Holds a DAP2 DDS.
This class adds some useful state information to the DDS structure. It is for use on the client side of the connection.
- Note
- Make sure to pass a valid pointer to the DDS constructor or use the set_factory() method before actually using the DDS. Also make sure that the Factory's lifetime thereafter is the same as the DDS's. Never delete the factory until you're done using the DDS.
-
Update: I removed the DEFAULT_BASETYPE_FACTORY switch because it caused more confusion than it avoided. See Trac #130.
-
The compile-time symbol DEFAULT_BASETYPE_FACTORY controls whether the old (3.4 and earlier) DDS and DataDDS constructors are supported. These constructors now use a default factory class (BaseTypeFactory, implemented by this library) to instantiate Byte, ..., Grid variables. To use the default ctor in your code you must also define this symbol. If you do choose to define this and fail to provide a specialization of BaseTypeFactory when your software needs one, you code may not link or may fail at run time. In addition to the older ctors for DDS and DataDDS, defining the symbol also makes some of the older methods in Connect available (because those methods require the older DDS and DataDDS ctors.
- See also
- Connect
Definition at line 76 of file DataDDS.h.
| void libdap::DDS::mark_all |
( |
bool | state | ) |
|
|
inherited |
Mark the send_p flag of the named variable to state.
Mark the named variable by setting its SEND_P flag to STATE (true indicates that it is to be sent). Names must be fully qualified.
- Note
- For aggregate types this sets each part to STATE when STATE is True. Thus, if State is True and N is exp1.test', then both exp1' and test' have their SEND_P flag set to True. If STATE is False, then the
SEND_P flag of the test' is set to False, but `exp1' is left unchanged. This means that a single variable can be removed from the current projection without removing all the other children of its parent. See the mfunc set_send_p().
- Returns
- True if the named variable was found, false otherwise.
- Todo
- These methods that use the btp_stack to keep track of the path from the top of a dataset to a particular variable can be rewritten to use the parent field instead.
- Todo
- All the methods that use names to identify variables should have counterparts that take BaseType pointers. */ bool DDS::mark(const string &n, bool state) { unique_ptr<BaseType::btp_stack> s(new BaseType::btp_stack);
DBG2(cerr << "DDS::mark: Looking for " << n << endl);
BaseType *variable = var(n, s.get()); if (!variable) { throw Error(malformed_expr, "Could not find variable " + n); }
variable->set_send_p(state);
DBG2(cerr << "DDS::mark: Set variable " << variable->d_name() << " (a " << variable->type_name() << ")" << endl);
Now check the btp_stack and run BaseType::set_send_p for every BaseType pointer on the stack. Using BaseType::set_send_p() will set the property for a Constructor but not its contained variables which preserves the semantics of projecting just one field. while (!s->empty()) { s->top()->BaseType::set_send_p(state);
DBG2(cerr << "DDS::mark: Set variable " << s->top()->d_name() << " (a " << s->top()->type_name() << ")" << endl);
string parent_name = (s->top()->get_parent()) ? s->top()->get_parent()->name() : "none"; string parent_type = (s->top()->get_parent()) ? s->top()->get_parent()->type_name() : "none"; DBG2(cerr << "DDS::mark: Parent variable " << parent_name << " (a " << parent_type << ")" << endl);
s->pop(); }
return true; }
/** Mark the member variable send_p flags to state.
- Returns
- Void
Definition at line 1386 of file DDS.cc.