WvStreams
|
Public Member Functions | |
Iter (const WvDBusMsg &_msg) | |
Iter (const WvDBusMsg::Iter &_it) | |
Iter (const DBusMessageIter &_first) | |
void | rewind () |
Rewinds the iterator to make it point to an imaginary element preceeding the first element of the list. More... | |
int | type () const |
Returns the data type of the current element. More... | |
Iter | open () const |
Returns a sub-iterator for walking through recursive types, such as arrays, structs, and variants. More... | |
bool | next () |
Moves the iterator along the list to point to the next element. More... | |
Iter & | getnext () |
Same as next(), but returns *this instead so you can convert the new item to the right value type. More... | |
bool | cur () const |
Returns: true if the current link is valid. More... | |
void | get_all (WvStringList &list) |
Fill a WvStringList with a string for each element of the iter. More... | |
WvString | get_all () |
Return a WvString representation of all elements in a single string. More... | |
WvString | get_str () const |
Get the current element as a string (possible for all types). More... | |
int64_t | get_int () const |
Get the current element as an int64_t (possible for all integer types) More... | |
operator int64_t () const | |
operator int32_t () const | |
operator int16_t () const | |
operator int8_t () const | |
operator bool () const | |
uint64_t | get_uint () const |
Get the current element as a uint64_t (possible for all integer types) More... | |
operator uint64_t () const | |
operator uint32_t () const | |
operator uint16_t () const | |
operator uint8_t () const | |
double | get_double () const |
Get the current element as a double (possible for all integer and floating point types) More... | |
operator double () const | |
operator float () const | |
WvString * | ptr () const |
Returns a pointer to the WvString at the iterator's current location. More... | |
operator WvString () const | |
WvIterStuff (WvString) | |
Public Attributes | |
DBusMessageIter *const | first |
DBusMessageIter *const *const | it |
WvString | s |
bool | rewound |
Definition at line 176 of file wvdbusmsg.h.
WvDBusMsg::Iter::Iter | ( | const WvDBusMsg & | _msg | ) |
Definition at line 34 of file wvdbusmsg.cc.
WvDBusMsg::Iter::Iter | ( | const WvDBusMsg::Iter & | _it | ) |
Definition at line 42 of file wvdbusmsg.cc.
WvDBusMsg::Iter::Iter | ( | const DBusMessageIter & | _first | ) |
Definition at line 50 of file wvdbusmsg.cc.
WvDBusMsg::Iter::~Iter | ( | ) |
Definition at line 58 of file wvdbusmsg.cc.
void WvDBusMsg::Iter::rewind | ( | ) |
Rewinds the iterator to make it point to an imaginary element preceeding the first element of the list.
Definition at line 65 of file wvdbusmsg.cc.
int WvDBusMsg::Iter::type | ( | ) | const |
Returns the data type of the current element.
Not usually needed, as the iterator converts elements automatically between most types.
Definition at line 82 of file wvdbusmsg.cc.
WvDBusMsg::Iter WvDBusMsg::Iter::open | ( | ) | const |
Returns a sub-iterator for walking through recursive types, such as arrays, structs, and variants.
You don't strictly need to call this for variants; get_str() and friends will do the right thing.
Definition at line 88 of file wvdbusmsg.cc.
bool WvDBusMsg::Iter::next | ( | ) |
Moves the iterator along the list to point to the next element.
If the iterator had just been rewound, it now points to the first element of the list.
Definition at line 71 of file wvdbusmsg.cc.
Referenced by getnext().
|
inline |
Same as next(), but returns *this instead so you can convert the new item to the right value type.
Note: this doesn't do error checking to see if the parameter exists.
Definition at line 222 of file wvdbusmsg.h.
References next().
bool WvDBusMsg::Iter::cur | ( | ) | const |
Returns: true if the current link is valid.
Definition at line 96 of file wvdbusmsg.cc.
void WvDBusMsg::Iter::get_all | ( | WvStringList & | list | ) |
Fill a WvStringList with a string for each element of the iter.
Definition at line 102 of file wvdbusmsg.cc.
WvString WvDBusMsg::Iter::get_all | ( | ) |
Return a WvString representation of all elements in a single string.
Definition at line 112 of file wvdbusmsg.cc.
References WvStringList::join().
WvString WvDBusMsg::Iter::get_str | ( | ) | const |
Get the current element as a string (possible for all types).
Definition at line 120 of file wvdbusmsg.cc.
int64_t WvDBusMsg::Iter::get_int | ( | ) | const |
Get the current element as an int64_t (possible for all integer types)
Definition at line 160 of file wvdbusmsg.cc.
References WvFastString::num().
|
inline |
Definition at line 251 of file wvdbusmsg.h.
|
inline |
Definition at line 252 of file wvdbusmsg.h.
|
inline |
Definition at line 253 of file wvdbusmsg.h.
|
inline |
Definition at line 254 of file wvdbusmsg.h.
|
inline |
Definition at line 255 of file wvdbusmsg.h.
uint64_t WvDBusMsg::Iter::get_uint | ( | ) | const |
Get the current element as a uint64_t (possible for all integer types)
Definition at line 207 of file wvdbusmsg.cc.
References WvFastString::num().
|
inline |
Definition at line 262 of file wvdbusmsg.h.
|
inline |
Definition at line 263 of file wvdbusmsg.h.
|
inline |
Definition at line 264 of file wvdbusmsg.h.
|
inline |
Definition at line 265 of file wvdbusmsg.h.
double WvDBusMsg::Iter::get_double | ( | ) | const |
Get the current element as a double (possible for all integer and floating point types)
Definition at line 254 of file wvdbusmsg.cc.
|
inline |
Definition at line 272 of file wvdbusmsg.h.
|
inline |
Definition at line 273 of file wvdbusmsg.h.
WvString * WvDBusMsg::Iter::ptr | ( | ) | const |
Returns a pointer to the WvString at the iterator's current location.
Needed so that WvIterStuff() will work.
Definition at line 306 of file wvdbusmsg.cc.
|
inline |
Definition at line 280 of file wvdbusmsg.h.
DBusMessageIter* const WvDBusMsg::Iter::first |
Definition at line 179 of file wvdbusmsg.h.
DBusMessageIter* const * const WvDBusMsg::Iter::it |
Definition at line 179 of file wvdbusmsg.h.
|
mutable |
Definition at line 180 of file wvdbusmsg.h.
bool WvDBusMsg::Iter::rewound |
Definition at line 181 of file wvdbusmsg.h.