Loading...
Searching...
No Matches
EST_Val Class Reference

`#include <include/EST_Val.h>`

Collaboration diagram for EST_Val:
[legend]

## Public Member Functions

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_String & | String (void) const
const EST_String & | string (void) const
const EST_String & | S (void) const
const EST_String & | string_only (void) const
const void * | internal_ptr (void) const
Setting values
EST_Val & | operator= (const int i)
EST_Val & | operator= (const float f)
EST_Val & | operator= (const double d)
EST_Val & | operator= (const EST_String &s)
EST_Val & | operator= (const char *s)
EST_Val & | operator= (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
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() [1/8]

EST_Val::EST_Val | ( |  | ) |

inline

Default constructor

Definition at line 88 of file EST_Val.h.

## EST_Val() [2/8]

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() [3/8]

EST_Val::EST_Val | ( | const int | i | ) |

inline

Copy constructor for an int

Definition at line 95 of file EST_Val.h.

## EST_Val() [4/8]

EST_Val::EST_Val | ( | const float | f | ) |

inline

Copy constructor for a float

Definition at line 99 of file EST_Val.h.

## EST_Val() [5/8]

EST_Val::EST_Val | ( | const double | d | ) |

inline

Copy constructor for a double

Definition at line 103 of file EST_Val.h.

## EST_Val() [6/8]

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() [7/8]

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() [8/8]

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

Definition at line 64 of file EST_Val.cc.

## ~EST_Val()

EST_Val::~EST_Val | ( | void |  | ) |

Destructor

Definition at line 71 of file EST_Val.cc.

## Member Function Documentation

## type()

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.

## Int()

const int EST_Val::Int | ( | void |  | ) | const

inline

returns the value, cast as an int

Definition at line 130 of file EST_Val.h.

## I()

const int EST_Val::I | ( | void |  | ) | const

inline

returns the value, cast as an int

Definition at line 134 of file EST_Val.h.

## Float()

const float EST_Val::Float | ( | void |  | ) | const

inline

returns the value, cast as a float

Definition at line 138 of file EST_Val.h.

## F()

const float EST_Val::F | ( | void |  | ) | const

inline

returns the value, cast as a float

Definition at line 142 of file EST_Val.h.

## String()

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.

## string()

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.

## S()

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.

## string_only()

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.

## internal_ptr()

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

inline

Definition at line 163 of file EST_Val.h.

## operator=() [1/6]

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

inline

Assignment of val to an int

Definition at line 172 of file EST_Val.h.

## operator=() [2/6]

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

inline

Assignment of val to a float

Definition at line 175 of file EST_Val.h.

## operator=() [3/6]

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

inline

Assignment of val to a double

Definition at line 178 of file EST_Val.h.

## operator=() [4/6]

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.

## operator=() [5/6]

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.

## operator=() [6/6]

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

Assignment of val to another val

Definition at line 80 of file EST_Val.cc.

## operator==() [1/6]

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.

## operator==() [2/6]

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.

## operator==() [3/6]

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.

## operator==() [4/6]

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.

## operator==() [5/6]

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.

## operator==() [6/6]

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.

## operator!=() [1/6]

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.

## operator!=() [2/6]

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.

## operator!=() [3/6]

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.

## operator!=() [4/6]

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.

## operator!=() [5/6]

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.

## operator!=() [6/6]

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.

## operator int()

EST_Val::operator int | ( |  | ) | const

inline

Automatically cast val as an int

Definition at line 237 of file EST_Val.h.

## operator float()

EST_Val::operator float | ( |  | ) | const

inline

Automatically cast val as an float

Definition at line 239 of file EST_Val.h.

## operator EST_String()

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 Symbol Documentation

## operator<<

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

friend

print val

Definition at line 244 of file EST_Val.h.

## Member Data Documentation

## ival

int EST_Val::ival

Definition at line 74 of file EST_Val.h.

## fval

float EST_Val::fval

Definition at line 75 of file EST_Val.h.

## pval

EST_Contents* EST_Val::pval

Definition at line 76 of file EST_Val.h.

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

- include/EST_Val.h
- base_class/EST_Val.cc