#include <NArgs.h>
Inherited by AbsFunction::Impl< T > [private]
, IntFunction::Impl [private]
, LRSecToMinFunction::LRSecToMinFunctionImpl [private]
, MinOrMaxFunction< minOrMax >::Impl< T > [private]
, PadFunction::Impl [private]
, RandFunction::DoubleRandFunction [private]
, RandFunction::Int32RandFunction [private]
, RandFunction::Int64RandFunction [private]
, RandFunction::SingleRandFunction [private]
, and StrLenFunction::Impl [private]
.
Public Member Functions | |
NArgs (ptr< Expression > a=ptr< Expression >(), ptr< Expression > b=ptr< Expression >(), ptr< Expression > c=ptr< Expression >()) | |
Constructor. | |
NArgs (const vector< ptr< Expression > > &args) | |
Constructs an NArgs, setting the argument list to the contents of the vector provided. | |
void | requireNumArgs (int args_required) const throw (ExprException) |
Throws an ExprException if the number of arguments is not equal to args_required. | |
void | requireNumArgs (int minargs, int maxargs) const throw (ExprException) |
Throws an ExprException if the number of arguments is not between minargs and maxargs, inclusive. | |
void | requireArgType (unsigned int index, DataType type1, DataType type2=DataType(), DataType type3=DataType(), DataType type4=DataType()) const throw ( ExprException ) |
Requires that the index'th argument (zero-relative) is of one of the provided types. | |
const ptr< Expression > & | arg (unsigned int idx) const |
Returns the idx'th argument (zero-relative). | |
unsigned int | numArgs () const |
Returns the number of arguments. | |
const ptr< Expression > & | operator[] (unsigned int idx) const |
Returns the idx'th argument (zero-relative). | |
unsigned int | size () const |
Returns the number of arguments. | |
bool | empty () const |
Returns true iff there are zero arguments. | |
Static Public Attributes | |
const int | VARARGS = -1 |
Indicates that an arbitrary number of arguments are allowed. | |
Protected Attributes | |
vector< ptr< Expression > > | _args |
|
Constructor. Each non-null argument is added to the argument list. |
|
Constructs an NArgs, setting the argument list to the contents of the vector provided.
|
|
Returns the idx'th argument (zero-relative). Undefined behavior if the argument list is too short. |
|
Returns true iff there are zero arguments.
|
|
Returns the number of arguments.
|
|
Returns the idx'th argument (zero-relative). Undefined behavior if the argument list is too short. |
|
Requires that the index'th argument (zero-relative) is of one of the provided types.
|
|
Throws an ExprException if the number of arguments is not between minargs and maxargs, inclusive. (If maxargs is VARARGS, then there is no upper limit to the number of arguments allowed.) |
|
Throws an ExprException if the number of arguments is not equal to args_required.
|
|
Returns the number of arguments.
|
|
|
|
Indicates that an arbitrary number of arguments are allowed.
|