WvStreams
Public Member Functions | Public Attributes
WvDBusMsg::Iter Class Reference

List of all members.

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.
int type () const
 Returns the data type of the current element.
Iter open () const
 Returns a sub-iterator for walking through recursive types, such as arrays, structs, and variants.
bool next ()
 Moves the iterator along the list to point to the next element.
Itergetnext ()
 Same as next(), but returns *this instead so you can convert the new item to the right value type.
bool cur () const
 Returns: true if the current link is valid.
void get_all (WvStringList &list)
 Fill a WvStringList with a string for each element of the iter.
WvString get_all ()
 Return a WvString representation of all elements in a single string.
WvString get_str () const
 Get the current element as a string (possible for all types).
int64_t get_int () const
 Get the current element as an int64_t (possible for all integer types)
 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)
 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)
 operator double () const
 operator float () const
WvStringptr () const
 Returns a pointer to the WvString at the iterator's current location.
 operator WvString () const
 WvIterStuff (WvString)

Public Attributes

DBusMessageIter *const first
DBusMessageIter *const *const it
WvString s
bool rewound

Detailed Description

Definition at line 183 of file wvdbusmsg.h.


Member Function Documentation

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.

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.

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().

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 229 of file wvdbusmsg.h.

References next().

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.


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