Public Member Functions | |
VarArg () | |
Default constructor. | |
VarArg (const boost::any &p) | |
Constructor getting any element. | |
VarArg (const VarArg &v) | |
Copyconstructor. | |
VarArg & | operator, (const boost::any &) |
Fill the list with new element. | |
boost::any & | operator[] (int index) |
Get access to certain element. | |
uint32 | size () const |
Get number of elements stored here. | |
boost::any | pop_front () |
Stack based function to retrieve the elements form the list. | |
boost::any | pop_back () |
Stack based function to retrieve the elements form the list. | |
void | empty () |
Empty the resulting list. | |
void | push_back (const boost::any &) |
Push new elements into the argument list. | |
template<class T> | |
T | get (int index) |
Get an element of casted to a certain type. | |
template<class T> | |
T | cast (const boost::any &p) |
Cast the element to a certain type. | |
template<class T> | |
void | convert (std::vector< T > &v) const |
Convert the variable argument list into a vector of certain type. |
VariadicArgument - This class is usefull if you want to pass variable parameters to a function of a script. You can surely easy use the calling function, by providing a vector containing the data, but you have to create the vector before. Herewith you just write (Class << data1 << data2 ... ) to create temporary a list of contained data and pass it as an argument
The variadic argument object could also be used to retrieve a resulting value from a function. Such a result value would contain more than one result which can then be casted to any type.
Definition at line 37 of file VariadicArgument.h.