dbus-cxx logo
Public Member Functions | Protected Attributes | List of all members
DBus::SignatureIterator Class Reference

Signature iterator allowing type signatures to be parsed. More...

#include <signatureiterator.h>

Public Member Functions

 SignatureIterator ()
 
 SignatureIterator (const std::string &signature)
 
DBusSignatureIter * cobj ()
 Returns a pointer to the underlying DBusSignatureIter object. More...
 
bool init (const std::string &signature)
 Initializes the iterator for the specified signature. More...
 
void invalidate ()
 Invalidates the iterator. More...
 
bool is_valid () const
 True if this is a valid iterator. More...
 
 operator bool () const
 True if the iterator is valid and initialized, false otherwise. More...
 
bool next ()
 Moves the iterator to the next field and invalidates it if it moves beyond the last field. More...
 
SignatureIteratoroperator++ ()
 
SignatureIterator operator++ (int)
 
bool operator== (const SignatureIterator &other)
 
Type type () const
 Returns the argument type that the iterator points to. More...
 
Type element_type () const
 Returns the element type of the array that the iterator points to. More...
 
bool is_basic () const
 True if the element type is a basic type. More...
 
bool is_fixed () const
 True if the element type is a fixed type. More...
 
bool is_container () const
 True if the iterator points to a container. More...
 
bool is_array () const
 True if the iterator points to an array. More...
 
bool is_dict () const
 True if the iterator points to a dictionary. More...
 
SignatureIterator recurse ()
 If the iterator points to a container recurses into the container returning a sub-iterator. More...
 
std::string signature () const
 Returns the current signature of the iterator. More...
 

Protected Attributes

DBusSignatureIter m_cobj
 
bool m_valid
 

Detailed Description

Signature iterator allowing type signatures to be parsed.

Author
Rick L Vinyard Jr rviny.nosp@m.ard@.nosp@m.cs.nm.nosp@m.su.e.nosp@m.du

Constructor & Destructor Documentation

DBus::SignatureIterator::SignatureIterator ( )

References m_cobj.

DBus::SignatureIterator::SignatureIterator ( const std::string &  signature)

References init(), and m_cobj.

Member Function Documentation

DBusSignatureIter * DBus::SignatureIterator::cobj ( )

Returns a pointer to the underlying DBusSignatureIter object.

References m_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 ( )

Invalidates the iterator.

References m_cobj, and m_valid.

Referenced by next().

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

True if the element type is a basic type.

References type().

bool DBus::SignatureIterator::is_container ( ) const

True if the iterator points to a container.

References type().

Referenced by recurse().

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

True if the element type is a fixed type.

References element_type().

bool DBus::SignatureIterator::is_valid ( ) const

True if this is a valid iterator.

References m_valid, type(), and DBus::TYPE_INVALID.

Referenced by next().

bool DBus::SignatureIterator::next ( )

Moves the iterator to the next field and invalidates it if it moves beyond the last field.

Returns
true if the iterator moves forward, false if there is no next field and the iterator has been invalidated

References invalidate(), is_valid(), m_cobj, type(), and DBus::TYPE_INVALID.

Referenced by operator++().

DBus::SignatureIterator::operator bool ( ) const

True if the iterator is valid and initialized, false otherwise.

SignatureIterator & DBus::SignatureIterator::operator++ ( )

References next().

SignatureIterator DBus::SignatureIterator::operator++ ( int  )
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

Returns the current signature of the iterator.

References m_cobj.

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

Member Data Documentation

DBusSignatureIter DBus::SignatureIterator::m_cobj
protected
bool DBus::SignatureIterator::m_valid
protected

Referenced by init(), invalidate(), is_valid(), recurse(), and type().


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

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8