ecolab::TCL_args Class Reference

Represent arguments to TCL commands. More...

#include <TCL_obj_base.h>

Collaboration diagram for ecolab::TCL_args:
Collaboration graph

Public Member Functions

 TCL_args (int a, Tcl_Obj *const *v)
 
TCL_args operator[] (int i) const
 
void pushObj (Tcl_Obj *obj)
 
const char * str ()
 
TCL_argsoperator<< (const std::string &x)
 
TCL_argsoperator<< (const char *x)
 
TCL_argsoperator<< (bool x)
 
TCL_argsoperator<< (int x)
 
TCL_argsoperator<< (unsigned x)
 
TCL_argsoperator<< (long x)
 
TCL_argsoperator<< (double x)
 
TCL_argsoperator>> (std::string &x)
 
TCL_argsoperator>> (const char *&x)
 
TCL_argsoperator>> (bool &x)
 
TCL_argsoperator>> (int &x)
 
TCL_argsoperator>> (unsigned &x)
 
TCL_argsoperator>> (long &x)
 
TCL_argsoperator>> (double &x)
 
template<class T >
enable_if< is_rvalue< T >, T >::T get (dummy< 0 > d=0)
 
template<class T >
enable_if< Not< is_rvalue< T > >, T >::T get (dummy< 1 > d=0)
 
template<class T >
 operator T ()
 

Public Attributes

const int & count
 

Detailed Description

Represent arguments to TCL commands.

Declare a member function taking a single argument of type TCL_args, the extract the arguments using operator>>, or assign the arguments 1 by 1, or use operator[] to access

struct foo
{
void bar1(TCL_args args)
{
int arg1=args, arg2=args;
}
int bar2(TCL_args args)
{
int arg1, arg2;
args>>arg1>>arg2;
}
int bar3(TCL_args args)
{
int arg1=args[0], arg2=args[1];
}
}

args[-1] refers to the command name.


The documentation for this class was generated from the following file: