Edinburgh Speech Tools  2.4-release
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
EST_Val Class Reference

#include <include/EST_Val.h>

Collaboration diagram for EST_Val:

Public Member Functions

const void * internal_ptr (void) const
 
Constructor and Destructor functions
 EST_Val ()
 
 EST_Val (const EST_Val &val)
 
 EST_Val (const int i)
 
 EST_Val (const float f)
 
 EST_Val (const double d)
 
 EST_Val (const EST_String &s)
 
 EST_Val (const char *s)
 
 EST_Val (val_type type, void *p, void(*f)(void *))
 
 ~EST_Val (void)
 
Getting cast values
const val_type type (void) const
 
const int Int (void) const
 
const int I (void) const
 
const float Float (void) const
 
const float F (void) const
 
const EST_StringString (void) const
 
const EST_Stringstring (void) const
 
const EST_StringS (void) const
 
const EST_Stringstring_only (void) const
 
Setting values
EST_Valoperator= (const int i)
 
EST_Valoperator= (const float f)
 
EST_Valoperator= (const double d)
 
EST_Valoperator= (const EST_String &s)
 
EST_Valoperator= (const char *s)
 
EST_Valoperator= (const EST_Val &c)
 
Equivalence test
int operator== (const EST_Val &a) const
 
int operator== (const EST_String &a) const
 
int operator== (const char *a) const
 
int operator== (const int &i) const
 
int operator== (const float &f) const
 
int operator== (const double &d) const
 
int operator!= (const EST_Val &a) const
 
int operator!= (const EST_String &a) const
 
int operator!= (const char *a) const
 
int operator!= (const int &i) const
 
int operator!= (const float &f) const
 
int operator!= (const double &d) const
 
Automatic casting
 operator int () const
 
 operator float () const
 
 operator EST_String () const
 

Friends

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

Detailed Description

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.

Definition at line 70 of file EST_Val.h.

Constructor & Destructor Documentation

EST_Val::EST_Val ( )
inline

Default constructor

Definition at line 88 of file EST_Val.h.

EST_Val::EST_Val ( const EST_Val val)

Copy constructor for another EST_Val

Definition at line 48 of file EST_Val.cc.

EST_Val::EST_Val ( const int  i)
inline

Copy constructor for an int

Definition at line 95 of file EST_Val.h.

EST_Val::EST_Val ( const float  f)
inline

Copy constructor for a float

Definition at line 99 of file EST_Val.h.

EST_Val::EST_Val ( const double  d)
inline

Copy constructor for a double

Definition at line 103 of file EST_Val.h.

EST_Val::EST_Val ( const EST_String s)
inline

Copy constructor for a string

Definition at line 107 of file EST_Val.h.

EST_Val::EST_Val ( const char *  s)
inline

Copy constructor for a string literal

Definition at line 111 of file EST_Val.h.

EST_Val::~EST_Val ( void  )

Destructor

Definition at line 71 of file EST_Val.cc.

Member Function Documentation

const val_type EST_Val::type ( void  ) const
inline

returns the type that the val is currently holding

Definition at line 126 of file EST_Val.h.

const int EST_Val::Int ( void  ) const
inline

returns the value, cast as an int

Definition at line 130 of file EST_Val.h.

const int EST_Val::I ( void  ) const
inline

returns the value, cast as an int

Definition at line 134 of file EST_Val.h.

const float EST_Val::Float ( void  ) const
inline

returns the value, cast as a float

Definition at line 138 of file EST_Val.h.

const float EST_Val::F ( void  ) const
inline

returns the value, cast as a float

Definition at line 142 of file EST_Val.h.

const EST_String& EST_Val::String ( void  ) const
inline

returns the value, cast as a string

Definition at line 146 of file EST_Val.h.

const EST_String& EST_Val::string ( void  ) const
inline

returns the value, cast as a string

Definition at line 150 of file EST_Val.h.

const EST_String& EST_Val::S ( void  ) const
inline

returns the value, cast as a string

Definition at line 154 of file EST_Val.h.

const EST_String& EST_Val::string_only ( void  ) const
inline

returns the value, cast as a string

Definition at line 158 of file EST_Val.h.

EST_Val& EST_Val::operator= ( const int  i)
inline

Assignment of val to an int

Definition at line 172 of file EST_Val.h.

EST_Val& EST_Val::operator= ( const float  f)
inline

Assignment of val to a float

Definition at line 175 of file EST_Val.h.

EST_Val& EST_Val::operator= ( const double  d)
inline

Assignment of val to a double

Definition at line 178 of file EST_Val.h.

EST_Val& EST_Val::operator= ( const EST_String s)
inline

Assignment of val to a string

Definition at line 181 of file EST_Val.h.

EST_Val& EST_Val::operator= ( const char *  s)
inline

Assignment of val to a string literal

Definition at line 184 of file EST_Val.h.

EST_Val & EST_Val::operator= ( const EST_Val c)

Assignment of val to another val

Definition at line 80 of file EST_Val.cc.

int EST_Val::operator== ( const EST_Val a) const
inline

Test whether val is equal to a

Definition at line 198 of file EST_Val.h.

int EST_Val::operator== ( const EST_String a) const
inline

Test whether val is equal to the string a

Definition at line 206 of file EST_Val.h.

int EST_Val::operator== ( const char *  a) const
inline

Test whether val is equal to the char * a

Definition at line 208 of file EST_Val.h.

int EST_Val::operator== ( const int &  i) const
inline

Test whether val is equal to the int a

Definition at line 210 of file EST_Val.h.

int EST_Val::operator== ( const float &  f) const
inline

Test whether val is equal to the float a

Definition at line 212 of file EST_Val.h.

int EST_Val::operator== ( const double &  d) const
inline

Test whether val is equal to the double a

Definition at line 214 of file EST_Val.h.

int EST_Val::operator!= ( const EST_Val a) const
inline

Test whether val is not equal to the val a

Definition at line 218 of file EST_Val.h.

int EST_Val::operator!= ( const EST_String a) const
inline

Test whether val is not equal to the string a

Definition at line 220 of file EST_Val.h.

int EST_Val::operator!= ( const char *  a) const
inline

Test whether val is not equal to the char * a

Definition at line 222 of file EST_Val.h.

int EST_Val::operator!= ( const int &  i) const
inline

Test whether val is not equal to the int a

Definition at line 224 of file EST_Val.h.

int EST_Val::operator!= ( const float &  f) const
inline

Test whether val is not equal to the float a

Definition at line 226 of file EST_Val.h.

int EST_Val::operator!= ( const double &  d) const
inline

Test whether val is not equal to the double float a

Definition at line 228 of file EST_Val.h.

EST_Val::operator int ( ) const
inline

Automatically cast val as an int

Definition at line 237 of file EST_Val.h.

EST_Val::operator float ( ) const
inline

Automatically cast val as an float

Definition at line 239 of file EST_Val.h.

EST_Val::operator EST_String ( ) const
inline

Automatically cast val as an string

Definition at line 241 of file EST_Val.h.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  s,
const EST_Val a 
)
friend

print val

Definition at line 244 of file EST_Val.h.


The documentation for this class was generated from the following files: