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

[more] Constructor and Destructor functions

[more] EST_Val ()
Default constructor
[more] EST_Val (const EST_Val &val)
Copy constructor for another EST_Val
[more] EST_Val (const int i)
Copy constructor for an int
[more] EST_Val (const float f)
Copy constructor for a float
[more] EST_Val (const double d)
Copy constructor for a double
[more] EST_Val (const EST_String &s)
Copy constructor for a string
[more] EST_Val (const char* s)
Copy constructor for a string literal
[more] ~EST_Val (void)
Destructor

[more] Getting cast values

[more]const val_type type (void) const
returns the type that the val is currently holding
[more]const int Int (void) const
returns the value, cast as an int
[more]const int I (void) const
returns the value, cast as an int
[more]const float Float (void) const
returns the value, cast as an float
[more]const float F (void) const
returns the value, cast as an float
[more]const EST_String& String (void) const
returns the value, cast as an string
[more]const EST_String& string (void) const
returns the value, cast as an string
[more]const EST_String& S (void) const
returns the value, cast as an string
[more]const EST_String& string_only (void) const
returns the value, cast as an string

[more] Setting values

[more]EST_Val& operator= (const int i)
Assignment of val to an int
[more]EST_Val& operator= (const float f)
Assignment of val to a float
[more]EST_Val& operator= (const double d)
Assignment of val to a double
[more]EST_Val& operator= (const EST_String &s)
Assignment of val to a string
[more]EST_Val& operator= (const char* s)
Assignment of val to a string literal
[more]EST_Val& operator= (const EST_Val &c)
Assignment of val to another val

[more] Equivalence test

[more]int operator == (const EST_Val &a) const
Test whether val is equal to a
[more]int operator == (const EST_String &a) const
Test whether val is equal to the string a
[more]int operator == (const char* a) const
Test whether val is equal to the char * a
[more]int operator == (const int &i) const
Test whether val is equal to the int a
[more]int operator == (const float &f) const
Test whether val is equal to the float a
[more]int operator == (const double &d) const
Test whether val is equal to the double a
[more]int operator != (const EST_Val &a) const
Test whether val is not equal to the val a
[more]int operator != (const EST_String &a) const
Test whether val is not equal to the string a
[more]int operator != (const char* a) const
Test whether val is not equal to the char * a
[more]int operator != (const int &i) const
Test whether val is not equal to the int a
[more]int operator != (const float &f) const
Test whether val is not equal to the float a
[more]int operator != (const double &d) const
Test whether val is not equal to the double float a
[more] Automatic casting

[more] operator int () const
Automatically cast val as an int
[more] operator float () const
Automatically cast val as an float
[more] operator EST_String () const
Automatically cast val as an string

[more] 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.
o Constructor and Destructor functions

o EST_Val()
Default constructor

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

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

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

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

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

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

o ~EST_Val(void)
Destructor

o Getting cast values

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

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

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

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

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

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

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

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

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

o Setting values

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

o Automatic casting

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

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

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

o 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