In file DataDDS.h:

class DataDDS : public DDS

Holds a DODS DDS.

Inheritance:


Public Methods

DataDDS(const string &n = "", const string &v = "")
The DataDDS constructor needs a name and a version string
void set_version(const string &v)
Sets the version string
int get_version_major()
Returns the major version number
int get_version_minor()
Returns the minor version number

Public

int sequence\_level()()
Returns the level of the last sequence read.
void set\_sequence\_level(int level)(int level)
Sets the level of the sequence being read.

Inherited from DDS:

Public Methods

void append_constant(BaseType *btp)
bool send(const string &dataset, const string &constraint, FILE *out, bool compressed = true, const string &cgi_ver = DVR)
void mark_all(bool state)
bool mark(const string &name, bool state)
bool check_semantics(bool all = false)

Public

Dataset Name Accessors

string get_dataset_name()
Returns the dataset's name
void set_dataset_name(const string &n)
Sets the dataset name

File Name Accessor

string filename()
Gets the dataset file name
void filename(const string &fn)
Set the dataset's filename

Variable Methods

void add_var(BaseType *bt)
Adds a variable to the DDS
void del_var(const string &n)
Removes a variable from the DDS
var()
Returns a pointer to a variable from the DDS
BaseType* var(const string &n)
Returns a pointer to the named variable
BaseType* var(const char *n)
Returns a pointer to the named variable
BaseType* var(const string &n, btp_stack &s)
Search for for variable {\it n} as above but record all compound type variables which ultimately contain {\it n} on {\it s}
BaseType* var(Pix p)
Returns a pointer to the indicated variable
Pix first_var()
Returns the first variable in the DDS
void next_var(Pix &p)
Increments the DDS variable counter to point at the next variable
int num_var()
Returns the number of variables in the DDS

External Function Accessors

template void add_function(const string &name, FUNC_T f)
Add a function to the list
void add_function(const string &name, bool_func f)
Add a boolean function to the list
void add_function(const string &name, btp_func f)
Add a BaseType function to the list
void add_function(const string &name, proj_func f)
Add a projection function to the list
bool find_function(const string &name, bool_func *f) const
Find a Boolean function with a given name in the function list
bool find_function(const string &name, btp_func *f) const
Find a BaseType function with a given name in the function list
bool find_function(const string &name, proj_func *f) const
Find a projection function with a given name in the function list

Constraint Expression

Pix first_clause()
Returns a pointer to the first clause in a parsed constraint expression
void next_clause(Pix &p)
Increments a pointer to indicate the next clause in a parsed constraint expression
Clause& clause(Pix p)
Returns a clause of a parsed constraint expression
bool clause_value(Pix p, const string &dataset)
Returns the value of the indicated clause of a constraint expression
append\_clause()
Adds a clause to a constraint expression
void append_clause(int op, rvalue *arg1, rvalue_list *arg2)
Adds an operator clause to the constraint expression.
void append_clause(bool_func func, rvalue_list *args)
Adds a boolean function clause to the constraint expression.
void append_clause(btp_func func, rvalue_list *args)
Adds a real-valued function clause to the constraint expression.
bool functional_expression()
Does the current constraint expression return a BaseType pointer?
bool boolean_expression()
Does the current constraint expression return a boolean value?
BaseType* eval_function(const string &dataset)
Evaluate a function-valued constraint expression
bool eval_selection(const string &dataset)
Evaluate a boolean-valued constraint expression

parse\_constraint

bool parse_constraint(const string &constraint, ostream &os = cout, bool server = true)
Parse a constraint expression .
bool parse_constraint(const string &constraint, FILE *out, bool server = true)

Read Methods

bool parse(string fname)
Parse a DDS from a file with the given name
bool parse(int fd)
Parse a DDS from a file indicated by the input file descriptor
bool parse(FILE *in=stdin)
Parse a DDS from a file indicated by the input file descriptor

Print Methods

bool print(ostream &os = cout)
Print the entire DDS on the specified output stream
bool print(FILE *out)
Print the entire DDS to the specified file
bool print_constrained(ostream &os = cout)
Print the constrained DDS to the specified file
bool print_constrained(FILE *out)
Print a constrained DDS to the specified file

Documentation

This class adds some useful state information to the DDS structure. It is for use on the client side of the DODS connection.
DataDDS(const string &n = "", const string &v = "")
The DataDDS constructor needs a name and a version string. This is generally received from the server.

void set_version(const string &v)
Sets the version string. This typically looks something like: #DODS/2.15#, where ``2'' is the major version number, and ``15'' the minor number.

int get_version_major()
Returns the major version number

int get_version_minor()
Returns the minor version number

int sequence\_level()()
Return the last level of a sequence object that was read. Note that #Sequence::deserialize()# is the main user of this information and it really only matters in cases where the Sequence object contains other Sequence objects. In that case, this information provides state for #Sequence::deserialize()# so that it can return to the level at which it last read.

void set\_sequence\_level(int level)(int level)
Set the value for #sequence_level()#. Use this function to store state information about the current sequence. This is used mostly when reading nested sequences so that #Sequence::deserialize()# can return to the correct level when resuming a deserialization from a subsequent call.


This class has no child classes.
See Also:
Connect

alphabetic index hierarchy of classes


generated by doc++