class Param

Parameter value base class

Inheritance:


Public Methods

Param(char Type)
Base constructor.
virtual ~Param(void)
Destructor.
virtual operator int() const
Cast parameter value to integer.
virtual operator double() const
Cast parameter value to dounble precision float.
virtual operator std::string() const
Cast parameter value to atring.
virtual int operator=(int x)
Set parameter value to integer.
virtual double operator=(double x)
Set parameter value to integer.
virtual std::string operator=(const std::string& x)
Set parameter value to integer.
virtual std::ostream& Write(std::ostream& ostr)
Write the parameter value.
const char* getType(void) const
Get the parameter type.

Documentation

Parameter base class defines the access operators for parameter objects.
Param(char Type)
Base constructor.
Parameters:
Type - character indicating object type.

virtual ~Param(void)
Destructor.

virtual operator int() const
Cast the parameter value to a integer. If the parameter can't be converted to integer, 0 is returned.
Returns:
Parameter value converted to an integer.

virtual operator double() const
Cast the parameter value to a double precision float. If the parameter can't be converted to a float, 0.0 is returned.
Returns:
Parameter value converted to float.

virtual operator std::string() const
Cast the parameter value to a string.
Returns:
Parameter value converted to a atring.

virtual int operator=(int x)
Set the parameter to an integer value. The argument is converted to the parameter type if necessary. The parameter type remains unchanged.
Returns:
Parameter value converted to an integer.

virtual double operator=(double x)
Set the parameter to an double float value. The argument is converted to the parameter type if necessary. The parameter type remains unchanged.
Returns:
Parameter value converted to an integer.

virtual std::string operator=(const std::string& x)
Set the parameter to a string value. The argument is converted to the parameter type if necessary. The parameter type remains unchanged.
Returns:
Parameter value converted to an integer.

virtual std::ostream& Write(std::ostream& ostr)
Write the parameter value to the specified output stream.
Returns:
Reference to the output stream.

const char* getType(void) const
Get the parameter type character.
Returns:
Pointer to a character string containing the character type.


Direct child classes:
param_type
Author:
John G. Zweizig
Version:
1.1; Last modified April 1, 1999.

alphabetic index hierarchy of classes


generated by doc++