nrEngine::VarArg Class Reference

VariadicArgument - Class helping you to pass variable number of parameters to a scripting function. More...


Public Member Functions

 VarArg ()
 Default constructor.
 VarArg (const boost::any &p)
 Constructor getting any element.
 VarArg (const VarArg &v)
 Copyconstructor.
VarArgoperator, (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>
get (int index)
 Get an element of casted to a certain type.
template<class 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.


Detailed Description

VariadicArgument - Class helping you to pass variable number of parameters to a scripting function.

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.


The documentation for this class was generated from the following files:
Generated on Wed Sep 12 23:19:43 2007 for nrEngine by  doxygen 1.5.1