class param : public xobj

XSIL parameter class.

Inheritance:


Public Methods

param(void)
Default constructor.
param(const char* Name, const char* Type=0, const char* Unit=0, const char* Value = 0)
Param constructor.
param(const char* Name, const char* Unit, double Value)
Param constructor.
param(const char* Name, const char* Unit, int Value)
Param constructor.
~param(void)
Destructor.
void Spew(Xwriter& xout) const
Write parameter definition to an XML output file.
xobj* Clone(void) const
Clone a parameter definition.
const char* getObjType(void) const
Mandatory xobj identification function
const char* getUnit(void) const
Get the parameter units.
const char* getValue(void) const
Get the parameter value.
void setUnit(const char* Unit)
Set the parameter units.
void setValue(const std::string& Value)
Set the parameter to a string value.
void setValue(double Value)
Set the parameter to a numeric value.
void setValue(unsigned int Value)
Set the parameter to an unsigned integer value.
void setValue(int Value)
Set the parameter to an integer value.
void setValue(const char* Value)
Set the parameter to a string value.

Inherited from xobj:

Public Methods

const char* getName(void) const
const char* getType(void) const
const std::string& refName(void) const
const std::string& refType(void) const
void setName(const char* Name)
void setType(const char* Type)

Documentation

xsil::param defines parameter objects in an xsil structure.
param(void)
Create an unnamed, untyped parameter.

param(const char* Name, const char* Type=0, const char* Unit=0, const char* Value = 0)
Create a constructor with the specified name, type, and units. Any of the arguments may be set to a null string by coding 0 instead of a character string pointer.
Parameters:
Name - Pointer to parameter name string.
Type - Pointer to parameter type string.
Unit - Pointer to parameter unit string.
Value - Pointer to the parameter value string.

param(const char* Name, const char* Unit, double Value)
Create a constructor with the specified name, type, and units, and a numeric value. Any of the string arguments may be set to a null by coding 0 instead of a character string pointer.
Parameters:
Name - Pointer to parameter name string.
Unit - Pointer to parameter unit string.
Value - Parameter value.

param(const char* Name, const char* Unit, int Value)
Create a constructor with the specified name, type, and units, and a numeric value. Any of the string arguments may be set to a null by coding 0 instead of a character string pointer.
Parameters:
Name - Pointer to parameter name string.
Unit - Pointer to parameter unit string.
Value - Parameter value.

~param(void)
Parameter destructor.

void Spew(Xwriter& xout) const
The parameter object is translated to XML and written to an SML output stream.
Parameters:
XML - output writer on which the parameter is to be written.

xobj* Clone(void) const
An new parameter object is constructed and a pointer to the object is returned.
Returns:
Pointre to the clone.

const char* getObjType(void) const
Mandatory xobj identification function
Returns:
Pointer to the object type string.

const char* getUnit(void) const
The parameter nunit attribute is returned as a string.
Returns:
Pointer to the parameter units string.

const char* getValue(void) const
The parameter value is returned as a string.
Returns:
Pointer to the parameter value string.

void setUnit(const char* Unit)
The parameter units attribute is set to the argument string. No action is taken if UNit is a null pointer.
Parameters:
Unit - Pointer to the parameter unit string.

void setValue(const std::string& Value)
The parameter value string is set to the value of the argument.

void setValue(double Value)
The argument is converted to a string and copied in to the parameter value string.

void setValue(unsigned int Value)
The argument is converted to a string and copied in to the parameter value string.

void setValue(int Value)
The argument is converted to a string and copied in to the parameter value string.

void setValue(const char* Value)
The parameter value string is set to the value of the argument.


This class has no child classes.
Author:
J. Zweizig
Version:
1.1; Modified December 13, 1999

alphabetic index hierarchy of classes


generated by doc++