|
ISLEman
|
Variant type which can hold one value of a fixed set of types. More...
#include <template.h>
Classes | |
| class | Delegate |
| Helper class to create a delegate that can store a function/method call. More... | |
Public Types | |
| enum | Type { None, Bool, Integer, String, Struct, List, Function } |
| Types of data that can be stored in a TemplateVariant. | |
Public Member Functions | |
| Type | type () const |
| Returns the type of the value stored in the variant. | |
| QCString | typeAsString () const |
| Return a string representation of the type of the value stored in the variant. | |
| bool | isValid () const |
| Returns TRUE if the variant holds a valid value, or FALSE otherwise. | |
| TemplateVariant () | |
| Constructs an invalid variant. More... | |
| TemplateVariant (bool b) | |
| Constructs a new variant with a boolean value b. More... | |
| TemplateVariant (int v) | |
| Constructs a new variant with a integer value v. More... | |
| TemplateVariant (const char *s, bool raw=FALSE) | |
| Constructs a new variant with a string value s. More... | |
| TemplateVariant (const QCString &s, bool raw=FALSE) | |
| Constructs a new variant with a string value s. More... | |
| TemplateVariant (TemplateStructIntf *s) | |
| Constructs a new variant with a struct value s. More... | |
| TemplateVariant (TemplateListIntf *l) | |
| Constructs a new variant with a list value l. More... | |
| TemplateVariant (const Delegate &delegate) | |
| Constructs a new variant which represents a method call. More... | |
| ~TemplateVariant () | |
| Destroys the Variant object. | |
| TemplateVariant (const TemplateVariant &v) | |
| Constructs a copy of the variant, v, passed as the argument to this constructor. | |
| TemplateVariant & | operator= (const TemplateVariant &v) |
| Assigns the value of the variant v to this variant. More... | |
| bool | operator== (TemplateVariant &other) |
| Compares this QVariant with v and returns true if they are equal; otherwise returns false. | |
| QCString | toString () const |
| Returns the variant as a string. More... | |
| bool | toBool () const |
| Returns the variant as a boolean. More... | |
| int | toInt () const |
| Returns the variant as an integer. More... | |
| TemplateListIntf * | toList () const |
| Returns the pointer to list referenced by this variant or 0 if this variant does not have list type. | |
| TemplateStructIntf * | toStruct () const |
| Returns the pointer to struct referenced by this variant or 0 if this variant does not have struct type. | |
| TemplateVariant | call (const QValueList< TemplateVariant > &args) |
| Return the result of apply this function with args. More... | |
| void | setRaw (bool b) |
| Sets whether or not the value of the Variant should be escaped or written as-is (raw). More... | |
| bool | raw () const |
| Returns whether or not the value of the Value is raw. More... | |
Variant type which can hold one value of a fixed set of types.
|
inline |
Constructs an invalid variant.
|
inlineexplicit |
Constructs a new variant with a boolean value b.
|
inline |
Constructs a new variant with a integer value v.
|
inline |
Constructs a new variant with a string value s.
|
inline |
Constructs a new variant with a string value s.
| TemplateVariant::TemplateVariant | ( | TemplateStructIntf * | s | ) |
Constructs a new variant with a struct value s.
| TemplateVariant::TemplateVariant | ( | TemplateListIntf * | l | ) |
Constructs a new variant with a list value l.
|
inline |
Constructs a new variant which represents a method call.
|
inline |
Return the result of apply this function with args.
Returns an empty string if the variant type is not a function.
| TemplateVariant & TemplateVariant::operator= | ( | const TemplateVariant & | v | ) |
Assigns the value of the variant v to this variant.
|
inline |
Returns whether or not the value of the Value is raw.
|
inline |
Sets whether or not the value of the Variant should be escaped or written as-is (raw).
| [in] | b | TRUE means write as-is, FALSE means apply escaping. |
| bool TemplateVariant::toBool | ( | ) | const |
Returns the variant as a boolean.
| int TemplateVariant::toInt | ( | ) | const |
Returns the variant as an integer.
|
inline |
Returns the variant as a string.
1.8.12