WvStreams
Public Member Functions | Public Attributes | List of all members
WvDBusMsg::Iter Class Reference

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)
 
 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 176 of file debian/libwvstreams-dev/usr/include/wvstreams/wvdbusmsg.h.

Constructor & Destructor Documentation

◆ Iter() [1/3]

WvDBusMsg::Iter::Iter ( const WvDBusMsg _msg)

Definition at line 34 of file wvdbusmsg.cc.

◆ Iter() [2/3]

WvDBusMsg::Iter::Iter ( const WvDBusMsg::Iter _it)

Definition at line 42 of file wvdbusmsg.cc.

◆ Iter() [3/3]

WvDBusMsg::Iter::Iter ( const DBusMessageIter &  _first)

Definition at line 50 of file wvdbusmsg.cc.

◆ ~Iter()

WvDBusMsg::Iter::~Iter ( )

Definition at line 58 of file wvdbusmsg.cc.

Member Function Documentation

◆ rewind()

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.

◆ type() [1/2]

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.

◆ open() [1/2]

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.

◆ next() [1/2]

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

◆ getnext() [1/2]

Iter & WvDBusMsg::Iter::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 debian/libwvstreams-dev/usr/include/wvstreams/wvdbusmsg.h.

References next().

◆ cur()

bool WvDBusMsg::Iter::cur ( ) const

Returns: true if the current link is valid.

Definition at line 96 of file wvdbusmsg.cc.

◆ get_all() [1/2]

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.

◆ get_all() [2/2]

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

◆ get_str()

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.

◆ get_int()

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

◆ operator int64_t() [1/2]

WvDBusMsg::Iter::operator int64_t ( ) const
inline

◆ operator int32_t() [1/2]

WvDBusMsg::Iter::operator int32_t ( ) const
inline

◆ operator int16_t() [1/2]

WvDBusMsg::Iter::operator int16_t ( ) const
inline

◆ operator int8_t() [1/2]

WvDBusMsg::Iter::operator int8_t ( ) const
inline

◆ operator bool() [1/2]

WvDBusMsg::Iter::operator bool ( ) const
inline

◆ get_uint()

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

◆ operator uint64_t() [1/2]

WvDBusMsg::Iter::operator uint64_t ( ) const
inline

◆ operator uint32_t() [1/2]

WvDBusMsg::Iter::operator uint32_t ( ) const
inline

◆ operator uint16_t() [1/2]

WvDBusMsg::Iter::operator uint16_t ( ) const
inline

◆ operator uint8_t() [1/2]

WvDBusMsg::Iter::operator uint8_t ( ) const
inline

◆ get_double()

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.

◆ operator double() [1/2]

WvDBusMsg::Iter::operator double ( ) const
inline

◆ operator float() [1/2]

WvDBusMsg::Iter::operator float ( ) const
inline

◆ ptr() [1/2]

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.

◆ operator WvString() [1/2]

WvDBusMsg::Iter::operator WvString ( ) const
inline

◆ type() [2/2]

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.

◆ open() [2/2]

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.

◆ next() [2/2]

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.

◆ getnext() [2/2]

Iter & WvDBusMsg::Iter::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 include/wvdbusmsg.h.

References next().

◆ operator int64_t() [2/2]

WvDBusMsg::Iter::operator int64_t ( ) const
inline

Definition at line 251 of file include/wvdbusmsg.h.

◆ operator int32_t() [2/2]

WvDBusMsg::Iter::operator int32_t ( ) const
inline

Definition at line 252 of file include/wvdbusmsg.h.

◆ operator int16_t() [2/2]

WvDBusMsg::Iter::operator int16_t ( ) const
inline

Definition at line 253 of file include/wvdbusmsg.h.

◆ operator int8_t() [2/2]

WvDBusMsg::Iter::operator int8_t ( ) const
inline

Definition at line 254 of file include/wvdbusmsg.h.

◆ operator bool() [2/2]

WvDBusMsg::Iter::operator bool ( ) const
inline

Definition at line 255 of file include/wvdbusmsg.h.

◆ operator uint64_t() [2/2]

WvDBusMsg::Iter::operator uint64_t ( ) const
inline

Definition at line 262 of file include/wvdbusmsg.h.

◆ operator uint32_t() [2/2]

WvDBusMsg::Iter::operator uint32_t ( ) const
inline

Definition at line 263 of file include/wvdbusmsg.h.

◆ operator uint16_t() [2/2]

WvDBusMsg::Iter::operator uint16_t ( ) const
inline

Definition at line 264 of file include/wvdbusmsg.h.

◆ operator uint8_t() [2/2]

WvDBusMsg::Iter::operator uint8_t ( ) const
inline

Definition at line 265 of file include/wvdbusmsg.h.

◆ operator double() [2/2]

WvDBusMsg::Iter::operator double ( ) const
inline

Definition at line 272 of file include/wvdbusmsg.h.

◆ operator float() [2/2]

WvDBusMsg::Iter::operator float ( ) const
inline

Definition at line 273 of file include/wvdbusmsg.h.

◆ ptr() [2/2]

WvString * WvDBusMsg::Iter::ptr ( ) const

Returns a pointer to the WvString at the iterator's current location.

Needed so that WvIterStuff() will work.

◆ operator WvString() [2/2]

WvDBusMsg::Iter::operator WvString ( ) const
inline

Definition at line 280 of file include/wvdbusmsg.h.

Member Data Documentation

◆ first

DBusMessageIter *const WvDBusMsg::Iter::first

◆ it

DBusMessageIter *const *const WvDBusMsg::Iter::it

◆ s

WvString WvDBusMsg::Iter::s
mutable

◆ rewound

bool WvDBusMsg::Iter::rewound

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