variable type argument for DynInvoke APIs More...
#include <AmArg.h>
Data Structures | |
| struct | OutOfBoundsException |
| struct | TypeMismatchException |
Public Types | |
| enum | { Undef = 0, Int, Bool, Double, CStr, AObject, ADynInv, Blob, Array, Struct } |
| typedef std::vector< AmArg > | ValueArray |
|
typedef std::map< std::string, AmArg > | ValueStruct |
Public Member Functions | |
| AmArg (const AmArg &v) | |
| AmArg (const int &v) | |
| AmArg (const bool &v) | |
| AmArg (const double &v) | |
| AmArg (const char *v) | |
| AmArg (const string &v) | |
| AmArg (const ArgBlob v) | |
| AmArg (AmObject *v) | |
| AmArg (AmDynInvoke *v) | |
| AmArg (vector< std::string > &v) | |
| AmArg (const vector< int > &v) | |
| AmArg (const vector< double > &v) | |
| AmArg (std::map< std::string, std::string > &v) | |
| AmArg (std::map< std::string, AmArg > &v) | |
| void | assertArray () |
| void | assertArray () const |
| void | assertStruct () |
| void | assertStruct () const |
| short | getType () const |
| AmArg & | operator= (const AmArg &rhs) |
| void | setBorrowedPointer (AmObject *v) |
| int | asInt () const |
| int | asBool () const |
| double | asDouble () const |
| const char * | asCStr () const |
| AmObject * | asObject () const |
| AmDynInvoke * | asDynInv () const |
| ArgBlob * | asBlob () const |
| ValueStruct * | asStruct () const |
| vector< string > | asStringVector () const |
| vector< int > | asIntVector () const |
| vector< bool > | asBoolVector () const |
| vector< double > | asDoubleVector () const |
| vector< AmObject * > | asAmObjectVector () const |
| vector< ArgBlob > | asArgBlobVector () const |
| void | assertArray (size_t s) |
| void | push (const AmArg &a) |
| void | push (const string &key, const AmArg &val) |
| void | pop (AmArg &a) |
| void | pop_back (AmArg &a) |
| void | pop_back () |
| void | concat (const AmArg &a) |
| const size_t | size () const |
| AmArg & | get (size_t idx) |
| AmArg & | get (size_t idx) const |
| AmArg & | back () |
| AmArg & | back () const |
| AmArg & | operator[] (size_t idx) |
| AmArg & | operator[] (size_t idx) const |
| AmArg & | operator[] (int idx) |
| AmArg & | operator[] (int idx) const |
| AmArg & | operator[] (std::string key) |
| AmArg & | operator[] (std::string key) const |
| AmArg & | operator[] (const char *key) |
| AmArg & | operator[] (const char *key) const |
| bool | hasMember (const std::string &name) const |
| bool | hasMember (const char *name) const |
| std::vector< std::string > | enumerateKeys () const |
| ValueStruct::const_iterator | begin () const |
| ValueStruct::const_iterator | end () const |
| void | erase (const char *name) |
| void | erase (const std::string &name) |
| void | assertArrayFmt (const char *format) const |
| void | clear () |
| const char * | t2str (int type) |
Static Public Member Functions | |
| static string | print (const AmArg &a) |
Friends | |
| bool | operator== (const AmArg &lhs, const AmArg &rhs) |
| bool | json2arg (std::istream &input, AmArg &res) |
variable type argument for DynInvoke APIs
| void AmArg::assertArrayFmt | ( | const char * | format | ) | const |
throws exception if arg array does not conform to spec i - int t - bool f - double s - cstr o - object d - dyninvoke b - blob a - array u - struct
e.g. "ssif" -> [cstr, cstr, int, double]
| AmArg & AmArg::back | ( | ) |
throws OutOfBoundsException if array too small
| AmArg & AmArg::back | ( | ) | const |
throws OutOfBoundsException if array too small
| void AmArg::erase | ( | const char * | name | ) |
remove struct member
| void AmArg::erase | ( | const std::string & | name | ) |
remove struct member
| AmArg & AmArg::get | ( | size_t | idx | ) | const |
throws OutOfBoundsException if array too small
| AmArg & AmArg::get | ( | size_t | idx | ) |
throws OutOfBoundsException if array too small
Referenced by XMLRPC2DIServer::amarg2xmlrpcval(), UserTimer::invoke(), MyCCDialog::onDtmf(), Click2DialFactory::onInvite(), MyCCDialog::process(), CallGenDialog::process(), and AnswerMachineDialog::process().
| bool AmArg::hasMember | ( | const std::string & | name | ) | const |
Check for the existence of a struct member by name.
Referenced by JsonRpcServer::execRpc().
| AmArg & AmArg::operator[] | ( | size_t | idx | ) | const |
throws OutOfBoundsException if array too small
| AmArg & AmArg::operator[] | ( | int | idx | ) | const |
throws OutOfBoundsException if array too small
| AmArg & AmArg::operator[] | ( | size_t | idx | ) |
resizes array if too small
| AmArg & AmArg::operator[] | ( | int | idx | ) |
resizes array if too small
| bool json2arg | ( | std::istream & | input, | |
| AmArg & | res | |||
| ) | [friend] |
1.7.1