#include <signatureiterator.h>
Public Member Functions | |
SignatureIterator () | |
SignatureIterator (const std::string &signature) | |
DBusSignatureIter * | cobj () |
Returns a pointer to the underlying DBusSignatureIter object. | |
bool | init (const std::string &signature) |
Initializes the iterator for the specified signature. | |
void | invalidate () |
Invalidates the iterator. | |
bool | is_valid () const |
True if this is a valid iterator. | |
operator bool () const | |
True if the iterator is valid and initialized, false otherwise. | |
bool | next () |
Moves the iterator to the next field and invalidates it if it moves beyond the last field. | |
SignatureIterator & | operator++ () |
SignatureIterator | operator++ (int) |
bool | operator== (const SignatureIterator &other) |
Type | type () const |
Returns the argument type that the iterator points to. | |
Type | element_type () const |
Returns the element type of the array that the iterator points to. | |
bool | is_basic () const |
True if the element type is a basic type. | |
bool | is_fixed () const |
True if the element type is a fixed type. | |
bool | is_container () const |
True if the iterator points to a container. | |
bool | is_array () const |
True if the iterator points to an array. | |
bool | is_dict () const |
True if the iterator points to a dictionary. | |
SignatureIterator | recurse () |
If the iterator points to a container recurses into the container returning a sub-iterator. | |
std::string | signature () const |
Returns the current signature of the iterator. | |
Protected Attributes | |
DBusSignatureIter | m_cobj |
bool | m_valid |
DBus::SignatureIterator::SignatureIterator | ( | ) |
References m_cobj.
DBus::SignatureIterator::SignatureIterator | ( | const std::string & | signature | ) |
DBusSignatureIter * DBus::SignatureIterator::cobj | ( | ) |
Type DBus::SignatureIterator::element_type | ( | ) | const |
Returns the element type of the array that the iterator points to.
If the iterator does not point to an array TYPE_INVALID is returned.
References DBus::checked_type_cast(), m_cobj, type(), DBus::TYPE_ARRAY, and DBus::TYPE_INVALID.
Referenced by is_dict(), and is_fixed().
bool DBus::SignatureIterator::init | ( | const std::string & | signature | ) |
Initializes the iterator for the specified signature.
References m_cobj, and m_valid.
Referenced by SignatureIterator().
void DBus::SignatureIterator::invalidate | ( | ) |
bool DBus::SignatureIterator::is_array | ( | ) | const |
True if the iterator points to an array.
References type(), and DBus::TYPE_ARRAY.
Referenced by is_dict().
bool DBus::SignatureIterator::is_basic | ( | ) | const |
bool DBus::SignatureIterator::is_container | ( | ) | const |
bool DBus::SignatureIterator::is_dict | ( | ) | const |
True if the iterator points to a dictionary.
References element_type(), is_array(), and DBus::TYPE_DICT_ENTRY.
bool DBus::SignatureIterator::is_fixed | ( | ) | const |
bool DBus::SignatureIterator::is_valid | ( | ) | const |
True if this is a valid iterator.
References m_valid, type(), and DBus::TYPE_INVALID.
Referenced by next(), and operator bool().
bool DBus::SignatureIterator::next | ( | ) |
Moves the iterator to the next field and invalidates it if it moves beyond the last field.
References invalidate(), is_valid(), m_cobj, type(), and DBus::TYPE_INVALID.
Referenced by operator++().
DBus::SignatureIterator::operator bool | ( | ) | const |
SignatureIterator DBus::SignatureIterator::operator++ | ( | int | ) |
SignatureIterator & DBus::SignatureIterator::operator++ | ( | ) |
References next().
bool DBus::SignatureIterator::operator== | ( | const SignatureIterator & | other | ) |
References m_cobj.
SignatureIterator DBus::SignatureIterator::recurse | ( | ) |
If the iterator points to a container recurses into the container returning a sub-iterator.
If the iterator does not point to a container returns an empty (invalid) iterator.
References is_container(), m_cobj, and m_valid.
std::string DBus::SignatureIterator::signature | ( | ) | const |
Type DBus::SignatureIterator::type | ( | ) | const |
Returns the argument type that the iterator points to.
References DBus::checked_type_cast(), m_cobj, m_valid, and DBus::TYPE_INVALID.
Referenced by element_type(), is_array(), is_basic(), is_container(), is_valid(), and next().
DBusSignatureIter DBus::SignatureIterator::m_cobj [protected] |
Referenced by cobj(), element_type(), init(), invalidate(), next(), operator==(), recurse(), signature(), SignatureIterator(), and type().
bool DBus::SignatureIterator::m_valid [protected] |
Referenced by init(), invalidate(), is_valid(), recurse(), and type().