#include <expandlib-vartype-text.h>
Inherits expander::expandvartype< StringType >< StringType >.
Inheritance diagram for expander::expvartype_text< StringType >:
Public Methods | |
expvartype_text () | |
Default contructor, inits the string to "". | |
expvartype_text (const StringType &s) | |
Constructor with a parameter of type StringType, inits the string to 's'. | |
expvartype_text (const _TCHAR *s) | |
Constructor with a C-style string as parameter, inits the string to 's'. | |
virtual void | AppendValue (StringType &dest) const |
Appends the value of the var to a string. | |
virtual void | AppendValue (StringType &dest, const FParamVectorType ¶ms, const FVarMapType &vars, ExpandResultsType &results) const |
Appends the value of the var to a string, using params and rvars, putting any expanding results into results. | |
virtual void | SetValue (const StringType &s) |
Sets this variable to the string specified. | |
StringType & | get_string () |
Returns the string. | |
Protected Types | |
typedef ::std::vector< StringType > | FParamVectorType |
The type used for the parameter vectors (MSVC wouldn't allow me to use template arguments in these typedefs, or I don't know how it should be done). | |
typedef ::std::map< StringType, ::expander::expandvartype< StringType > * > | FVarMapType |
The type used for the map of variables (MSVC wouldn't allow me to use template arguments in these typedefs, or I don't know how it should be done). | |
Protected Attributes | |
StringType | value |
This class can be used in the program using ExpandLib for simple text variables.
It is based on both expandvartype as well as StringType, this makes it very flexible, as it inherits all the great stuff you can do with StringType (assignments, all kinds of string operations, whatever that type has to offer).
NOTE: The following is somewhat obsolete:
This class should also be used (at least for now) for numeric variables, just convert them to a string. All numeric values are handled like strings at the moment, they are only converted to "real" (as in true, not as in floating point) numeric values when needed.
Definition at line 55 of file expandlib-vartype-text.h.
|
The type used for the parameter vectors (MSVC wouldn't allow me to use template arguments in these typedefs, or I don't know how it should be done).
Definition at line 52 of file expandlib-vartype.h. Referenced by expander::expvartype_list< StringType, ItemType >::AppendValue(). |
|
The type used for the map of variables (MSVC wouldn't allow me to use template arguments in these typedefs, or I don't know how it should be done).
Definition at line 53 of file expandlib-vartype.h. |
|
Default contructor, inits the string to "".
Definition at line 62 of file expandlib-vartype-text.h. |
|
Constructor with a parameter of type StringType, inits the string to 's'.
Definition at line 65 of file expandlib-vartype-text.h. |
|
Constructor with a C-style string as parameter, inits the string to 's'.
Definition at line 68 of file expandlib-vartype-text.h. |
|
Appends the value of the var to a string, using params and rvars, putting any expanding results into results. This is called directly from 'expandable<StringType>::expand', when a variable with parameters has been found. Implements expander::expandvartype< StringType >. Definition at line 72 of file expandlib-vartype-text.h. |
|
Appends the value of the var to a string. This is called by operator+=(StringType &s,::expander::expandvartype<StringType> *v), which is called by 'expandable<StringType>::expand' when a variable without parameters has been found. Implements expander::expandvartype< StringType >. Definition at line 70 of file expandlib-vartype-text.h. |
|
Returns the string.
Definition at line 77 of file expandlib-vartype-text.h. |
|
Sets this variable to the string specified. This isn't called from ExpandLib itself, but it can be used by other programs. Implements expander::expandvartype< StringType >. Definition at line 74 of file expandlib-vartype-text.h. |
|
Definition at line 57 of file expandlib-vartype-text.h. |