In file ../include/EST_Val.h:

## class EST_Val

> The EST_Val class is a container class, used to store a single item which can be an int, float, string or other user-defined class.

### Public Methods

  | Constructor and Destructor functions
  | EST_Val () Default constructor
  | EST_Val (const EST_Val &val) Copy constructor for another EST_Val
  | EST_Val (const int i) Copy constructor for an int
  | EST_Val (const float f) Copy constructor for a float
  | EST_Val (const double d) Copy constructor for a double
  | EST_Val (const EST_String &s) Copy constructor for a string
  | EST_Val (const char* s) Copy constructor for a string literal
  | ~EST_Val (void) Destructor
  | Getting cast values
  const val_type | type (void) const returns the type that the val is currently holding
  const int | Int (void) const returns the value, cast as an int
  const int | I (void) const returns the value, cast as an int
  const float | Float (void) const returns the value, cast as an float
  const float | F (void) const returns the value, cast as an float
  const EST_String& | String (void) const returns the value, cast as an string
  const EST_String& | string (void) const returns the value, cast as an string
  const EST_String& | S (void) const returns the value, cast as an string
  const EST_String& | string_only (void) const returns the value, cast as an string
  | Setting values
  EST_Val& | operator= (const int i) Assignment of val to an int
  EST_Val& | operator= (const float f) Assignment of val to a float
  EST_Val& | operator= (const double d) Assignment of val to a double
  EST_Val& | operator= (const EST_String &s) Assignment of val to a string
  EST_Val& | operator= (const char* s) Assignment of val to a string literal
  EST_Val& | operator= (const EST_Val &c) Assignment of val to another val
  | Equivalence test
  int | operator == (const EST_Val &a) const Test whether val is equal to a
  int | operator == (const EST_String &a) const Test whether val is equal to the string a
  int | operator == (const char* a) const Test whether val is equal to the char * a
  int | operator == (const int &i) const Test whether val is equal to the int a
  int | operator == (const float &f) const Test whether val is equal to the float a
  int | operator == (const double &d) const Test whether val is equal to the double a
  int | operator != (const EST_Val &a) const Test whether val is not equal to the val a
  int | operator != (const EST_String &a) const Test whether val is not equal to the string a
  int | operator != (const char* a) const Test whether val is not equal to the char * a
  int | operator != (const int &i) const Test whether val is not equal to the int a
  int | operator != (const float &f) const Test whether val is not equal to the float a
  int | operator != (const double &d) const Test whether val is not equal to the double float a
  | Automatic casting
  | operator int () const Automatically cast val as an int
  | operator float () const Automatically cast val as an float
  | operator EST_String () const Automatically cast val as an string
  | if (a.type() == val_unset)

## Documentation

> The EST_Val class is a container class, used to store a single item which can be an int, float, string or other user-defined class. It is often used as the base item in the <link linkend="est-features">EST_Features</link> class, to enable features to take on values of different types.

`Constructor and Destructor functions`

`EST_Val()`
  Default constructor

`EST_Val(const EST_Val &val)`
  Copy constructor for another EST_Val

`EST_Val(const int i)`
  Copy constructor for an int

`EST_Val(const float f)`
  Copy constructor for a float

`EST_Val(const double d)`
  Copy constructor for a double

`EST_Val(const EST_String &s)`
  Copy constructor for a string

`EST_Val(const char* s)`
  Copy constructor for a string literal

`~EST_Val(void)`
  Destructor

`Getting cast values`

`const val_type type(void) const`
  returns the type that the val is currently holding

`const int Int(void) const`
  returns the value, cast as an int

`const int I(void) const`
  returns the value, cast as an int

`const float Float(void) const`
  returns the value, cast as an float

`const float F(void) const`
  returns the value, cast as an float

`const EST_String& String(void) const`
  returns the value, cast as an string

`const EST_String& string(void) const`
  returns the value, cast as an string

`const EST_String& S(void) const`
  returns the value, cast as an string

`const EST_String& string_only(void) const`
  returns the value, cast as an string

`Setting values`

`EST_Val& operator=(const int i)`
  Assignment of val to an int

`EST_Val& operator=(const float f)`
  Assignment of val to a float

`EST_Val& operator=(const double d)`
  Assignment of val to a double

`EST_Val& operator=(const EST_String &s)`
  Assignment of val to a string

`EST_Val& operator=(const char* s)`
  Assignment of val to a string literal

`EST_Val& operator=(const EST_Val &c)`
  Assignment of val to another val

`Equivalence test`

Friends:
  ostream& operator << (ostream &s, const EST_Val &a)

`int operator ==(const EST_Val &a) const`
  Test whether val is equal to a

`int operator ==(const EST_String &a) const`
  Test whether val is equal to the string a

`int operator ==(const char* a) const`
  Test whether val is equal to the char * a

`int operator ==(const int &i) const`
  Test whether val is equal to the int a

`int operator ==(const float &f) const`
  Test whether val is equal to the float a

`int operator ==(const double &d) const`
  Test whether val is equal to the double a

`int operator !=(const EST_Val &a) const`
  Test whether val is not equal to the val a

`int operator !=(const EST_String &a) const`
  Test whether val is not equal to the string a

`int operator !=(const char* a) const`
  Test whether val is not equal to the char * a

`int operator !=(const int &i) const`
  Test whether val is not equal to the int a

`int operator !=(const float &f) const`
  Test whether val is not equal to the float a

`int operator !=(const double &d) const`
  Test whether val is not equal to the double float a

`Automatic casting`

`operator int() const`
  Automatically cast val as an int

`operator float() const`
  Automatically cast val as an float

`operator EST_String() const`
  Automatically cast val as an string

`if(a.type() == val_unset)`

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk