libdap::DDS Class Reference

#include <DDS.h>

Inheritance diagram for libdap::DDS:

Inheritance graph
[legend]
Collaboration diagram for libdap::DDS:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< BaseType * >
::const_iterator 
Vars_citer
typedef std::vector< BaseType * >
::iterator 
Vars_iter
typedef std::vector< BaseType * >
::reverse_iterator 
Vars_riter

Public Member Functions

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.
bool check_semantics (bool all=false)
 Check the semantics of each of the variables represented in the DDS.
 DDS (const DDS &dds)
 DDS (BaseTypeFactory *factory, const string &n="")
void del_var (Vars_iter i1, Vars_iter i2)
 Removes a range of variables from the DDS.
void del_var (Vars_iter i)
 Removes a variable from the DDS.
void del_var (const string &n)
 Removes a variable from the DDS.
virtual void dump (ostream &strm) const
 dumps information about this object
virtual AttrTableget_attr_table ()
int get_client_dap_major () const
 Get the DAP major version as sent by the client.
int get_client_dap_minor () const
 Get the DAP minor version as sent by the client.
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.
BaseTypeFactoryget_factory () const
string get_request_xml_base () const
 Get the URL that will return this DDS/DDX/DataThing.
int get_timeout ()
BaseTypeget_var_index (int i)
 Get a variable.
Vars_iter get_vars_iter (int i)
 Get an iterator.
bool mark (const string &name, bool state)
 Mark the send_p flag of the named variable to state.
void mark_all (bool state)
int num_var ()
 Returns the number of variables in the DDS.
DDSoperator= (const DDS &rhs)
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 name.
void print (ostream &out)
 Print the entire DDS to the specified ostream.
void print (FILE *out)
 Print the entire DDS to the specified file.
void print_constrained (ostream &out)
 Print a constrained DDS to the specified ostream.
void print_constrained (FILE *out)
 Print a constrained DDS to the specified file.
void print_xml (ostream &out, bool constrained, const string &blob)
void print_xml (FILE *out, bool constrained, const string &blob)
void set_client_dap_major (int p)
 Set the DAP major version (typically using info from the client).
void set_client_dap_minor (int p)
 Set the DAP minor version (typically using info from the client).
void set_client_dap_version (const string &version_string)
void set_dap_major (int p)
 Set the DAP major version (typically using info from the client).
void set_dap_minor (int p)
 Set the DAP minor version (typically using info from the client).
void set_dap_version (const string &version_string)
BaseTypeFactoryset_factory (BaseTypeFactory *factory)
void set_request_xml_base (const string &xb)
void set_timeout (int t)
void tag_nested_sequences ()
 Traverse DDS, set Sequence leaf nodes.
void timeout_off ()
void timeout_on ()
virtual void transfer_attributes (DAS *das)
BaseTypevar (const string &n, BaseType::btp_stack *s=0)
 Find the variable with the given name.
BaseTypevar (const string &n, BaseType::btp_stack &s)
Vars_iter var_begin ()
 Return an iterator to the first variable.
Vars_iter var_end ()
 Return an iterator.
Vars_riter var_rbegin ()
 Return a reverse iterator.
Vars_riter var_rend ()
 Return a reverse iterator.
virtual ~DDS ()
Container Name Accessor
Get and set the current container. If there are multiple files being used to build this DDS, using a container will set a virtual structure for the current container.

See also:
Dataset Name Accessors


Structurecontainer ()
void container_name (const string &cn)
string container_name ()
File Name Accessor
Get and set the dataset's filename. This is the physical location on a disk where the dataset exists. The dataset name is simply a title.

See also:
Dataset Name Accessors


void filename (const string &fn)
string filename ()
Dataset Name Accessors
Get and set the dataset's name. This is the name of the dataset itself, and is not to be confused with the name of the file or disk on which it is stored.

string get_dataset_name () const
void set_dataset_name (const string &n)

Protected Member Functions

void duplicate (const DDS &dds)
BaseTypeexact_match (const string &name, BaseType::btp_stack *s=0)
virtual AttrTablefind_matching_container (AttrTable::entry *source, BaseType **dest_variable)
BaseTypeleaf_match (const string &name, BaseType::btp_stack *s=0)

Friends

class DDSTest


Detailed Description

The DAP2 Data Descriptor Object (DDS) is a data structure used by the DAP2 software to describe datasets and subsets of those datasets. The DDS may be thought of as the declarations for the data structures that will hold data requested by some DAP2 client. Part of the job of a DAP2 server is to build a suitable DDS for a specific dataset and to send it to the client. Depending on the data access API in use, this may involve reading part of the dataset and inferring the DDS. Other APIs may require the server simply to read some ancillary data file with the DDS in it.

On the server side, in addition to the data declarations, the DDS holds the clauses of any constraint expression that may have accompanied the data request from the DAP2 client. The DDS object includes methods for modifying the DDS according to the given constraint expression. It also has methods for directly modifying a DDS, and for transmitting it from a server to a client.

For the client, the DDS object includes methods for reading the persistent form of the object sent from a server. This includes parsing the ASCII representation of the object and, possibly, reading data received from a server into a data object.

Note that the class DDS is used to instantiate both DDS and DataDDS objects. A DDS that is empty (contains no actual data) is used by servers to send structural information to the client. The same DDS can becomes a DataDDS when data values are bound to the variables it defines.

For a complete description of the DDS layout and protocol, please refer to The OPeNDAP User Guide.

The DDS has an ASCII representation, which is what is transmitted from a DAP2 server to a client. Here is the DDS representation of an entire dataset containing a time series of worldwide grids of sea surface temperatures:

    Dataset {
        Float64 lat[lat = 180];
        Float64 lon[lon = 360];
        Float64 time[time = 404];
        Grid {
         ARRAY:
            Int32 sst[time = 404][lat = 180][lon = 360];
         MAPS:
            Float64 time[time = 404];
            Float64 lat[lat = 180];
            Float64 lon[lon = 360];
        } sst;
    } weekly;
    

If the data request to this dataset includes a constraint expression, the corresponding DDS might be different. For example, if the request was only for northern hemisphere data at a specific time, the above DDS might be modified to appear like this:

    Dataset {
        Grid {
         ARRAY:
            Int32 sst[time = 1][lat = 90][lon = 360];
         MAPS:
            Float64 time[time = 1];
            Float64 lat[lat = 90];
            Float64 lon[lon = 360];
        } sst;
    } weekly;
    

Since the constraint has narrowed the area of interest, the range of latitude values has been halved, and there is only one time value in the returned array. Note that the simple arrays (lat, lon, and time) described in the dataset are also part of the sst Grid object. They can be requested by themselves or as part of that larger object.

See the The OPeNDAP User Guide, or the documentation of the BaseType class for descriptions of the DAP2 data types.

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. jhrg

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:
BaseType

DAS

Definition at line 172 of file DDS.h.


Member Typedef Documentation

typedef std::vector<BaseType *>::const_iterator libdap::DDS::Vars_citer

Definition at line 227 of file DDS.h.

typedef std::vector<BaseType *>::iterator libdap::DDS::Vars_iter

Definition at line 228 of file DDS.h.

typedef std::vector<BaseType *>::reverse_iterator libdap::DDS::Vars_riter

Definition at line 229 of file DDS.h.


Constructor & Destructor Documentation

libdap::DDS::DDS ( BaseTypeFactory factory,
const string &  n = "" 
)

Make a DDS which uses the given BaseTypeFactory to create variables.

Parameters:
n The name of the dataset. Can also be set using the set_dataset_name() method.
factory BaseTypeFactory which instantiates Byte, ..., Grid. The caller is responsible for freeing the object after deleting this DDS. Can also be set using set_factory(). Never delete until just before deleting the DDS itself unless you intend to replace the factory with a new instance.
n The name of the data set. Can also be set using set_dataset_name().

Definition at line 141 of file DDS.cc.

References DBG.

libdap::DDS::DDS ( const DDS rhs  ) 

The DDS copy constructor.

Definition at line 152 of file DDS.cc.

References DBG, and duplicate().

Here is the call graph for this function:

libdap::DDS::~DDS (  )  [virtual]

Definition at line 159 of file DDS.cc.


Member Function Documentation

void libdap::DDS::add_var ( BaseType bt  ) 

Note:
The copy will not copy data values.
Parameters:
bt Source variable.

Definition at line 525 of file DDS.cc.

References libdap::Structure::add_var(), DBG2, and libdap::BaseType::ptr_duplicate().

Referenced by container_name(), libdap::DDXParser::ddx_end_document(), and duplicate().

Here is the call graph for this function:

bool libdap::DDS::check_semantics ( bool  all = false  ) 

Check the semantics of the DDS describing a complete dataset. If ALL is true, check not only the semantics of THIS->TABLE, but also recursively all ctor types in the THIS->TABLE. By default, ALL is false since parsing a DDS input file runs semantic checks on all variables (but not the dataset itself.

Returns:
TRUE if the conventions for the DDS are not violated, FALSE otherwise.
Parameters:
all If true, recursively check the individual members of compound variables.
See also:
BaseType::check_semantics

Definition at line 1132 of file DDS.cc.

References libdap::unique_names().

Here is the call graph for this function:

Structure * libdap::DDS::container (  ) 

Get the current container structure.

Definition at line 512 of file DDS.cc.

void libdap::DDS::container_name ( const string &  cn  ) 

Set the current container name and get or create a structure for that name.

Definition at line 484 of file DDS.cc.

References add_var(), and var().

Here is the call graph for this function:

string libdap::DDS::container_name (  ) 

Gets the dataset file name.

Definition at line 476 of file DDS.cc.

void libdap::DDS::del_var ( Vars_iter  i1,
Vars_iter  i2 
)

Remove the variables referenced by the range of iterators and free their storage.

Note:
Invalidates any iterators that reference the contents of the DDS.
Parameters:
i1 The start of the range.
i2 The end of the range.

Definition at line 591 of file DDS.cc.

void libdap::DDS::del_var ( Vars_iter  i  ) 

Remove the variable referenced by the iterator and free its storage.

Note:
Invalidates any iterators that reference the contents of the DDS.
Parameters:
i The Vars_iter which refers to the variable.

Definition at line 575 of file DDS.cc.

void libdap::DDS::del_var ( const string &  n  ) 

Remove the named variable from the DDS. This method is not smart about looking up names. The variable must exist at the top level of the DDS and must match exactly the name given.

Note:
Invalidates any iterators that reference the contents of the DDS.
Parameters:
n The name of the variable to remove.

Definition at line 552 of file DDS.cc.

References libdap::Structure::del_var().

Here is the call graph for this function:

void libdap::DDS::dump ( ostream &  strm  )  const [virtual]

Displays the pointer value of this instance and then calls parent dump

Parameters:
strm C++ i/o stream to dump the information to
Returns:
void

Implements libdap::DapObj.

Reimplemented in libdap::DataDDS.

Definition at line 1236 of file DDS.cc.

References libdap::AttrTable::dump(), libdap::DapIndent::Indent(), libdap::DapIndent::LMarg(), and libdap::DapIndent::UnIndent().

Here is the call graph for this function:

void libdap::DDS::duplicate ( const DDS dds  )  [protected]

Definition at line 95 of file DDS.cc.

References add_var(), DBG, var_begin(), and var_end().

Referenced by DDS(), and operator=().

Here is the call graph for this function:

BaseType * libdap::DDS::exact_match ( const string &  name,
BaseType::btp_stack s = 0 
) [protected]

Definition at line 682 of file DDS.cc.

References DBG2, libdap::BaseType::name(), libdap::BaseType::var(), and var().

Referenced by var().

Here is the call graph for this function:

void libdap::DDS::filename ( const string &  fn  ) 

Set the dataset's filename.

Definition at line 407 of file DDS.cc.

string libdap::DDS::filename (  ) 

Gets the dataset file name.

Definition at line 400 of file DDS.cc.

AttrTable * libdap::DDS::find_matching_container ( AttrTable::entry source,
BaseType **  dest_variable 
) [protected, virtual]

Given an attribute container from a DAS, find or make a destination for its contents in the DDS.

Parameters:
source Attribute table
dest_variable result param that holds the BaseType
Returns:
Destination Attribute Table

Definition at line 224 of file DDS.cc.

References libdap::AttrTable::append_container(), libdap::Attr_container, DBG, libdap::dods_grid_c, libdap::AttrTable::find_container(), libdap::BaseType::get_attr_table(), libdap::BaseType::get_parent(), libdap::AttrTable::entry::name, libdap::BaseType::type(), libdap::AttrTable::entry::type, and var().

Referenced by transfer_attributes().

Here is the call graph for this function:

AttrTable & libdap::DDS::get_attr_table (  )  [virtual]

Get the attribute table for the global attributes.

Definition at line 385 of file DDS.cc.

Referenced by libdap::DDXParser::ddx_start_document().

int libdap::DDS::get_client_dap_major (  )  const [inline]

Definition at line 283 of file DDS.h.

Referenced by print_xml().

int libdap::DDS::get_client_dap_minor (  )  const [inline]

Definition at line 285 of file DDS.h.

Referenced by print_xml().

int libdap::DDS::get_dap_major (  )  const [inline]

Definition at line 271 of file DDS.h.

int libdap::DDS::get_dap_minor (  )  const [inline]

Definition at line 273 of file DDS.h.

string libdap::DDS::get_dataset_name (  )  const

Returns the dataset's name.

Definition at line 369 of file DDS.cc.

BaseTypeFactory* libdap::DDS::get_factory (  )  const [inline]

Return the factory which makes instances of the Byte, ..., Grid type classes. Specialize BaseTypeFactory so that a DDS will be populated with your client or server's specialized types.

Returns:
An instance of BaseTypeFactory.

Definition at line 247 of file DDS.h.

Referenced by libdap::Connect::request_ddx().

string libdap::DDS::get_request_xml_base (  )  const [inline]

Definition at line 295 of file DDS.h.

Referenced by print_xml().

int libdap::DDS::get_timeout (  ) 

Definition at line 787 of file DDS.cc.

BaseType * libdap::DDS::get_var_index ( int  i  ) 

Return the ith variable.

Parameters:
i the index
Returns:
The corresponding variable

Definition at line 751 of file DDS.cc.

DDS::Vars_iter libdap::DDS::get_vars_iter ( int  i  ) 

Return the iterator for the ith variable.

Parameters:
i the index
Returns:
The corresponding Vars_iter

Definition at line 742 of file DDS.cc.

BaseType * libdap::DDS::leaf_match ( const string &  name,
BaseType::btp_stack s = 0 
) [protected]

Definition at line 646 of file DDS.cc.

References DBG, libdap::BaseType::is_constructor_type(), libdap::BaseType::is_vector_type(), libdap::BaseType::name(), and libdap::BaseType::var().

Referenced by var().

Here is the call graph for this function:

bool libdap::DDS::mark ( const string &  n,
bool  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:
This should throw an exception on error!!!
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.

Definition at line 1178 of file DDS.cc.

References DBG2, libdap::BaseType::name(), libdap::BaseType::set_send_p(), libdap::BaseType::type_name(), and var().

Here is the call graph for this function:

void libdap::DDS::mark_all ( bool  state  ) 

Mark the member variable send_p flags to state.

Returns:
Void

Definition at line 1222 of file DDS.cc.

int libdap::DDS::num_var (  ) 

Definition at line 758 of file DDS.cc.

DDS & libdap::DDS::operator= ( const DDS rhs  ) 

Definition at line 169 of file DDS.cc.

References DBG, and duplicate().

Here is the call graph for this function:

void libdap::DDS::parse ( FILE *  in = stdin  ) 

Parameters:
in Read the persistent DDS from this FILE*.
Exceptions:
InternalErr Thrown if in is null
Error Thrown if the parse fails.

Definition at line 857 of file DDS.cc.

References DBG2, dds_buffer(), dds_delete_buffer(), dds_switch_to_buffer(), and ddsparse().

Here is the call graph for this function:

void libdap::DDS::parse ( int  fd  ) 

Definition at line 828 of file DDS.cc.

References parse().

Here is the call graph for this function:

void libdap::DDS::parse ( string  fname  ) 

void libdap::DDS::print ( ostream &  out  ) 

Definition at line 899 of file DDS.cc.

References libdap::id2www().

Here is the call graph for this function:

void libdap::DDS::print ( FILE *  out  ) 

Definition at line 884 of file DDS.cc.

References libdap::id2www().

Referenced by main(), and libdap::DODSFilter::send_dds().

Here is the call graph for this function:

void libdap::DDS::print_constrained ( ostream &  out  ) 

Print those parts (variables) of the DDS structure to OS that are marked to be sent after evaluating the constraint expression.

Note:
This function only works for scalars at the top level.
Returns:
true.

Definition at line 950 of file DDS.cc.

References libdap::id2www().

Here is the call graph for this function:

void libdap::DDS::print_constrained ( FILE *  out  ) 

Print those parts (variables) of the DDS structure to OS that are marked to be sent after evaluating the constraint expression.

Note:
This function only works for scalars at the top level.
Returns:
true.

Definition at line 923 of file DDS.cc.

References libdap::id2www().

Referenced by libdap::DODSFilter::dataset_constraint(), and libdap::DODSFilter::send_dds().

Here is the call graph for this function:

void libdap::DDS::print_xml ( ostream &  out,
bool  constrained,
const string &  blob 
)

Print an XML representation of this DDS. This method is used to generate the part of the DDX response. The Dataset tag is not written by this code. The caller of this method must handle writing that and including the dataBLOB tag.

Parameters:
out Destination ostream.
constrained True if the output should be limited to just those variables that are in the projection of the current constraint expression.
blob The dataBLOB href.

Definition at line 1062 of file DDS.cc.

References c_dap20_namespace, c_dap32_namespace, c_default_dap20_schema_location, c_default_dap32_schema_location, c_xml_namespace, get_client_dap_major(), get_client_dap_minor(), get_request_xml_base(), grddl_transformation_dap32, libdap::id2xml(), libdap::AttrTable::print_xml(), var_begin(), and var_end().

Here is the call graph for this function:

void libdap::DDS::print_xml ( FILE *  out,
bool  constrained,
const string &  blob 
)

Print an XML representation of this DDS. This method is used to generate the part of the DDX response. The Dataset tag is not written by this code. The caller of this method must handle writing that and including the dataBLOB tag.

Parameters:
out Destination.
constrained True if the output should be limited to just those variables that are in the projection of the current constraint expression.
blob The dataBLOB href.

Definition at line 992 of file DDS.cc.

References c_dap20_namespace, c_dap32_namespace, c_default_dap20_schema_location, c_default_dap32_schema_location, get_client_dap_major(), get_client_dap_minor(), libdap::id2xml(), libdap::AttrTable::print_xml(), var_begin(), and var_end().

Referenced by main(), and libdap::DODSFilter::send_ddx().

Here is the call graph for this function:

void libdap::DDS::set_client_dap_major ( int  p  )  [inline]

Definition at line 288 of file DDS.h.

Referenced by set_client_dap_version().

void libdap::DDS::set_client_dap_minor ( int  p  )  [inline]

Definition at line 290 of file DDS.h.

Referenced by set_client_dap_version().

void libdap::DDS::set_client_dap_version ( const string &  version_string  ) 

Given a version string passed to a server from a client in the XDAP-Accept MIME header, parse that string and record the major and minor protocol version numbers. This method differs from set_dap_version() in that it is storing the version that the client would _like_ the server to use. The actual protocol version to which this DDS/DDX conforms is found using the get_dap_major() and get_dap_minor() methods.

Parameters:
version_string 

Definition at line 447 of file DDS.cc.

References DBG, set_client_dap_major(), and set_client_dap_minor().

Here is the call graph for this function:

void libdap::DDS::set_dap_major ( int  p  )  [inline]

Definition at line 276 of file DDS.h.

Referenced by set_dap_version().

void libdap::DDS::set_dap_minor ( int  p  )  [inline]

Definition at line 278 of file DDS.h.

Referenced by set_dap_version().

void libdap::DDS::set_dap_version ( const string &  version_string  ) 

Given the dap protocol version either from a MIME header or from within the DDX Dataset element, parse that string and set the DDS fields.

See also:
set_dap_client_version()
Parameters:
version_string The version string from the MIME of XML document.

Definition at line 419 of file DDS.cc.

References DBG, set_dap_major(), and set_dap_minor().

Referenced by libdap::DDXParser::ddx_start_element().

Here is the call graph for this function:

void libdap::DDS::set_dataset_name ( const string &  n  ) 

Sets the dataset name.

Definition at line 376 of file DDS.cc.

Referenced by libdap::DDXParser::ddx_start_element().

BaseTypeFactory* libdap::DDS::set_factory ( BaseTypeFactory factory  )  [inline]

Set the factory class used to instantiate variables during the parse of a DDS.

Parameters:
factory The factory this DDS should use. Caller must free factory when done with this DDS.
Returns:
The old factory.
See also:
BaseTypeFactory

Definition at line 258 of file DDS.h.

void libdap::DDS::set_request_xml_base ( const string &  xb  )  [inline]

See also:
get_request_xml_base

Definition at line 298 of file DDS.h.

void libdap::DDS::set_timeout ( int  t  ) 

Definition at line 780 of file DDS.cc.

Referenced by libdap::DODSFilter::send_data().

void libdap::DDS::tag_nested_sequences (  ) 

Definition at line 795 of file DDS.cc.

References libdap::dods_sequence_c, and libdap::dods_structure_c.

Referenced by libdap::DODSFilter::send_data().

void libdap::DDS::timeout_off (  ) 

void libdap::DDS::timeout_on (  ) 

void libdap::DDS::transfer_attributes ( DAS das  )  [virtual]

Given a DAS object, scavenge attributes from it and load them into this object and the variables it contains.

If a DAS contains attributes from the current (8/2006) HDF4 server with names like var_dim_0, var_dim_1, then make those attribute tables sub tables of the var table.

Todo:
Generalize the code that treats the _dim_? attributes or make is obsolete by fixing the HDF4 server.
Note:
This method is technically unnecessary because a server (or client) can easily add attributes directly using the DDS::get_attr_table or BaseType::get_attr_table methods and then poke values in using any of the methods AttrTable provides. This method exists to ease the transition to DDS objects which contain attribute information for the existing servers (Since they all make DAS objects separately from the DDS). They could be modified to use the same AttrTable methods but operate on the AttrTable instances in a DDS/BaseType instead of those in a DAS.
Parameters:
das Get attribute information from this DAS.

Definition at line 288 of file DDS.cc.

References libdap::AttrTable::append_attr(), libdap::AttrTable::append_container(), libdap::AttrTable::attr_begin(), libdap::Attr_container, libdap::AttrTable::attr_end(), libdap::AttrTable::entry::attributes, libdap::DAS::container_name(), DBG, find_matching_container(), libdap::AttrTable::get_attr_vector(), libdap::AttrTable::get_name(), libdap::DAS::get_top_level_attributes(), libdap::AttrTable::get_type(), and libdap::BaseType::is_constructor_type().

Referenced by main().

Here is the call graph for this function:

BaseType * libdap::DDS::var ( const string &  n,
BaseType::btp_stack s = 0 
)

Returns a pointer to the named variable. If the name contains one or more field separators then the function looks for a variable whose name matches exactly. If the name contains no field separators then the function looks first in the top level and then in all subsequent levels and returns the first occurrence found. In general, this function searches constructor types in the order in which they appear in the DDS, but there is no requirement that it do so.

Note:
If a dataset contains two constructor types which have field names that are the same (say point.x and pair.x) you should use fully qualified names to get each of those variables.
Parameters:
n The name of the variable to find.
s If given, this value-result parameter holds the path to the returned BaseType. Thus, this method can return the FQN for the variable n.
Returns:
A BaseType pointer to the variable or null if not found.

Definition at line 632 of file DDS.cc.

References exact_match(), leaf_match(), libdap::Structure::var(), and libdap::www2id().

Here is the call graph for this function:

BaseType * libdap::DDS::var ( const string &  n,
BaseType::btp_stack s 
)

Search for for variable n as above but record all compound type variables which ultimately contain n on s. This stack can then be used to mark the contained compound-type variables as part of the current projection.

Returns:
A BaseType pointer to the variable n or 0 if n could not be found.

Definition at line 608 of file DDS.cc.

Referenced by container_name(), exact_match(), find_matching_container(), and mark().

DDS::Vars_iter libdap::DDS::var_begin (  ) 

Returns the first variable in the DDS.

Definition at line 715 of file DDS.cc.

Referenced by libdap::DODSFilter::dataset_constraint(), duplicate(), and print_xml().

DDS::Vars_iter libdap::DDS::var_end (  ) 

Definition at line 727 of file DDS.cc.

Referenced by libdap::DODSFilter::dataset_constraint(), duplicate(), and print_xml().

DDS::Vars_riter libdap::DDS::var_rbegin (  ) 

Definition at line 721 of file DDS.cc.

DDS::Vars_riter libdap::DDS::var_rend (  ) 

Definition at line 733 of file DDS.cc.


Friends And Related Function Documentation

friend class DDSTest [friend]

Definition at line 209 of file DDS.h.


The documentation for this class was generated from the following files:

Generated on Wed Oct 7 19:38:13 2009 for libdap++ by  doxygen 1.5.9