In file Function.h:

class Function : public BaseType

Holds the Function data type.

Inheritance:


Public Methods

Function(const String &n = (char *)0)
The Function constructor.
Function(const Function &rhs)
The Function copy constructor
virtual void add_var(BaseType *bt, Part part)
Adds a variable to the indicated part of the Function
Pix first_indep_var()
Returns the index of the first independent variable
void next_indep_var(Pix &p)
Increments the given index to point to the next independent variable
BaseType* indep_var(Pix p)
Returns a pointer to the indicated independent variable
Pix first_dep_var()
Returns the index of the first dependent variable
void next_dep_var(Pix &p)
Increments the given index to point to the next dependent variable
BaseType* dep_var(Pix p)
Returns a pointer to the indicated dependent variable

Inherited from BaseType:

Public Methods

virtual BaseType* ptr_duplicate()
String name() const
void set_name(const String &n)
Type type() const
void set_type(const Type &t)
String type_name() const
bool is_simple_type()
bool is_vector_type()
bool is_constructor_type()
virtual int element_count(bool leaves = false)
bool synthesized_p()
void set_synthesized_p(bool state)
bool read_p()
virtual void set_read_p(bool state)
bool send_p()
virtual void set_send_p(bool state)
xdrproc_t xdr_coder()
virtual BaseType* var(const String &name = (char *)0, bool exact_match = true)
virtual BaseType* var(const String &name, btp_stack &s)
virtual unsigned int width()
virtual bool read(const String &dataset, int &error)
virtual unsigned int buf2val(void **val)
virtual unsigned int val2buf(void *val, bool reuse = false)
virtual bool serialize(const String &dataset, DDS &dds, XDR *sink, bool ce_eval = true)
virtual bool deserialize(XDR *source, DDS *dds, bool reuse = false)
virtual void print_decl(ostream &os, String space = " ", bool print_semi = true, bool constraint_info = false, bool constrained = false)
virtual void print_val(ostream &os, String space = "", bool print_decl_p = true)
virtual bool check_semantics(String &msg, bool all = false)
virtual bool ops(BaseType &b, int op, const String &dataset)

Documentation

This class holds the DODS Function data type. This compound type contains an implied causal relationship between two sets of variables, the independent and the dependent. The Function data type can be thought of as a combination of two discrete Structure variables, with one complete Structure representing the independent variables and the other representing the dependent ones. All the member functions of the Function have a parallel in the Structure class. Note that there is no naming distinction between independent and dependent variables. There is no way to indicate that a variable is in one part or the other besides which list it appears in. This means that all the names within the function must be unique. As with Structure, you can refer to members of Function members with a ``.'' notation. For example, if the Function has a member Structure called ``Ralph'' and Ralph has a member Int32 called ``age'', then you can refer to Ralph's age as ``Ralph.age''. The Function type should not be used by new programs. Use the Sequence class object instead.
Function(const String &n = (char *)0)
The Function constructor requires only the name of the variable to be created. The name may be omitted, which will create a nameless variable. This may be adequate for some applications.
Parameters:
n - A String containing the name of the variable to be created.

Function(const Function &rhs)
The Function copy constructor

virtual void add_var(BaseType *bt, Part part)
Adds a variable to the indicated part of the Function. All names of variables in a Function must be unique. You cannot have independent and dependent variables with the same name.

Pix first_indep_var()
Returns the index of the first independent variable

void next_indep_var(Pix &p)
Increments the given index to point to the next independent variable

BaseType* indep_var(Pix p)
Returns a pointer to the indicated independent variable

Pix first_dep_var()
Returns the index of the first dependent variable

void next_dep_var(Pix &p)
Increments the given index to point to the next dependent variable

BaseType* dep_var(Pix p)
Returns a pointer to the indicated dependent variable


This class has no child classes.
See Also:
Structure

alphabetic index hierarchy of classes


generated by doc++