|
| Var (Varinfo info) |
| Create a new Var, with undefined value.
|
|
| Var (Varinfo info, int val) |
| Create a new Var, with integer value.
|
|
| Var (Varinfo info, double val) |
| Create a new Var, with double value.
|
|
| Var (Varinfo info, const char *val) |
| Create a new Var, with character value.
|
|
| Var (const Var &var) |
| Copy constructor.
|
|
| Var (const Var &var, bool with_attrs) |
| Copy constructor.
|
|
| Var (Varinfo info, const Var &var) |
| Create a new Var with the value from another one. More...
|
|
Var & | operator= (const Var &var) |
| Assignment.
|
|
bool | operator== (const Var &var) const |
| Equality.
|
|
bool | operator!= (const Var &var) const |
| Equality.
|
|
Varcode | code () const throw () |
| Retrieve the Varcode for a variable.
|
|
Varinfo | info () const throw () |
| Get informations about the variable.
|
|
const char * | value () const throw () |
| Retrieve the internal string representation of the value for a variable.
|
|
bool | isset () const throw () |
|
int | enqi () const |
| Get the value as an integer.
|
|
double | enqd () const |
| Get the value as a double.
|
|
const char * | enqc () const |
| Get the value as a string.
|
|
template<typename T > |
T | enq () const |
| Templated version of enq.
|
|
template<typename T > |
T | enq (T default_value) const |
| Return the variable value, or the given default value if the variable is not set.
|
|
void | seti (int val) |
| Set the value from an integer value.
|
|
void | setd (double val) |
| Set the value from a double value.
|
|
void | setc (const char *val) |
| Set the value from a string value.
|
|
void | set_binary (const unsigned char *val) |
| Set the raw, binary value from a string value. More...
|
|
void | setc_truncate (const char *val) |
| Set the value from a string value, truncating val if it is too long. More...
|
|
void | set_from_formatted (const char *val) |
| Set from a value formatted with the format() method.
|
|
void | unset () |
| Unset the value.
|
|
void | clear_attrs () |
| Remove all attributes.
|
|
const Var * | enqa (Varcode code) const |
| Query variable attributes. More...
|
|
const Var * | enqa_by_associated_field_significance (unsigned significance) const |
| Query variable attribute according to significance given in CODE TABLE 031021.
|
|
void | seta (const Var &attr) |
| Set an attribute of the variable. More...
|
|
void | seta (std::auto_ptr< Var > attr) |
| Set an attribute of the variable. More...
|
|
void | unseta (Varcode code) |
| Remove the attribute with the given code.
|
|
const Var * | next_attr () const |
| Get the next attribute in the attribute list. More...
|
|
void | copy_val (const Var &src) |
| Set the value from another variable, performing conversions if needed. More...
|
|
void | copy_val_only (const Var &src) |
| Set the value from another variable, performing conversions if needed. More...
|
|
void | copy_attrs (const Var &src) |
| Copy all the attributes from another variable. More...
|
|
void | copy_attrs_if_defined (const Var &src) |
| Copy all the attributes from another variable, unless they are set to an undefined value. More...
|
|
std::string | format (const char *ifundef="(undef)") const |
| Create a formatted string representation of the variable value. More...
|
|
void | print (FILE *out) const |
| Print the variable to an output stream. More...
|
|
void | print (std::ostream &out) const |
| Print the variable to an output stream. More...
|
|
void | print_without_attrs (FILE *out) const |
| Print the variable to an output stream, without its attributes. More...
|
|
void | print_without_attrs (std::ostream &out) const |
| Print the variable to an output stream, without its attributes. More...
|
|
unsigned | diff (const Var &var) const |
| Compare two Var and return the number of differences. More...
|
|
void | lua_push (struct lua_State *L) |
| Push the variable as an object in the lua stack.
|
|
template<> |
int | enq () const |
|
template<> |
float | enq () const |
|
template<> |
double | enq () const |
|
template<> |
const char * | enq () const |
|
template<> |
std::string | enq () const |
|
|
void | set (int val) |
| Shortcuts (use with care, as the semanthics are slightly different depending on the type)
|
|
void | set (double val) |
| Shortcuts (use with care, as the semanthics are slightly different depending on the type)
|
|
void | set (const char *val) |
| Shortcuts (use with care, as the semanthics are slightly different depending on the type)
|
|
void | set (const std::string &val) |
| Shortcuts (use with care, as the semanthics are slightly different depending on the type)
|
|
void | set (const Var &var) |
| Shortcuts (use with care, as the semanthics are slightly different depending on the type)
|
|
Holds a wreport variable.
A wreport::Var contains: