FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
List of all members
FB::CatchAll Struct Reference

When used as a parameter on a JSAPIAuto function this matches 0 or more variants – in other words, all other parameters from this point on regardless of type. More...

#include "APITypes.h"

Detailed Description

When used as a parameter on a JSAPIAuto function this matches 0 or more variants – in other words, all other parameters from this point on regardless of type.

This helper struct allows your scriptable methods to receive 0 or more parameters in addition to some fixed ones. E.g. given the following scriptable method:

long howManyParams(long a, const std::string& b, const FB::CatchAll& more) {
const FB::VariantList& values = more.value;
long paramCount = 2 + values.size();
return paramCount;
}

The following calls would result in:

> obj.howManyParams(42, "moo");
=> returns 2
> obj.howManyParams(42, "moo", 1.0, "meh");
=> returns 4
Author
Georg Fritzsche
Date
10/15/2010

Definition at line 208 of file APITypes.h.


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