Edinburgh Speech Tools  2.1-release
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 ssize_t 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
val_type type (void) const
 
int Int (void) const
 
ssize_t I (void) const
 
float Float (void) 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= (ssize_t 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 ssize_t () 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 EST_Features class, to enable features to take on values of different types.

Definition at line 75 of file EST_Val.h.

Constructor & Destructor Documentation

EST_Val::EST_Val ( )
inline

Default constructor

Definition at line 93 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 ssize_t  i)
inline

Copy constructor for an ssize_t

Definition at line 106 of file EST_Val.h.

EST_Val::EST_Val ( const float  f)
inline

Copy constructor for a float

Definition at line 110 of file EST_Val.h.

EST_Val::EST_Val ( const double  d)
inline

Copy constructor for a double

Definition at line 114 of file EST_Val.h.

EST_Val::EST_Val ( const EST_String s)
inline

Copy constructor for a string

Definition at line 118 of file EST_Val.h.

EST_Val::EST_Val ( const char *  s)
inline

Copy constructor for a string literal

Definition at line 122 of file EST_Val.h.

EST_Val::EST_Val ( val_type  type,
void *  p,
void(*)(void *)  f 
)

Definition at line 64 of file EST_Val.cc.

EST_Val::~EST_Val ( void  )

Destructor

Definition at line 71 of file EST_Val.cc.

Member Function Documentation

val_type EST_Val::type ( void  ) const
inline

returns the type that the val is currently holding

Definition at line 137 of file EST_Val.h.

int EST_Val::Int ( void  ) const
inline

returns the value, cast as an int

Definition at line 141 of file EST_Val.h.

ssize_t EST_Val::I ( void  ) const
inline

returns the value, cast as an int

Definition at line 145 of file EST_Val.h.

float EST_Val::Float ( void  ) const
inline

returns the value, cast as a float

Definition at line 149 of file EST_Val.h.

float EST_Val::F ( void  ) const
inline

returns the value, cast as a float

Definition at line 153 of file EST_Val.h.

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

returns the value, cast as a string

Definition at line 157 of file EST_Val.h.

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

returns the value, cast as a string

Definition at line 161 of file EST_Val.h.

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

returns the value, cast as a string

Definition at line 165 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 169 of file EST_Val.h.

const void* EST_Val::internal_ptr ( void  ) const
inline

Definition at line 174 of file EST_Val.h.

EST_Val& EST_Val::operator= ( ssize_t  i)
inline

Assignment of val to an ssize_t

Definition at line 188 of file EST_Val.h.

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

Assignment of val to a float

Definition at line 191 of file EST_Val.h.

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

Assignment of val to a double

Definition at line 194 of file EST_Val.h.

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

Assignment of val to a string

Definition at line 197 of file EST_Val.h.

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

Assignment of val to a string literal

Definition at line 200 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 214 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 222 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 224 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 226 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 228 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 230 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 234 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 236 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 238 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 240 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 242 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 244 of file EST_Val.h.

EST_Val::operator ssize_t ( ) const
inline

Automatically cast val as an ssize_t

Definition at line 252 of file EST_Val.h.

EST_Val::operator float ( ) const
inline

Automatically cast val as an float

Definition at line 258 of file EST_Val.h.

EST_Val::operator EST_String ( ) const
inline

Automatically cast val as an string

Definition at line 260 of file EST_Val.h.

Friends And Related Function Documentation

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

print val

Definition at line 263 of file EST_Val.h.

Member Data Documentation

ssize_t EST_Val::ival

Definition at line 79 of file EST_Val.h.

float EST_Val::fval

Definition at line 80 of file EST_Val.h.

EST_Contents* EST_Val::pval

Definition at line 81 of file EST_Val.h.


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