Multi diag tools
Public Member Functions | Friends | List of all members
Mdt::PlainText::StringConstIterator Struct Reference

Iterator that acts on QString. More...

#include <StringConstIterator.h>

Public Member Functions

 StringConstIterator ()
 Default constructor. More...
 
 StringConstIterator (QString::const_iterator it)
 Constructor.
 
StringConstIteratoroperator= (const StringConstIterator &other)
 Assignement.
 
StringConstIteratoroperator= (QString::const_iterator &it)
 Assignement.
 
StringConstIteratoroperator++ ()
 Increment iterator (pre-increment)
 
StringConstIterator operator++ (int)
 Increment iterator (post-increment)
 
StringConstIteratoroperator-- ()
 Decrement iterator (pre-decrement)
 
StringConstIterator operator-- (int)
 Decrement iterator (post-decrement)
 
StringConstIterator operator- (difference_type n) const
 Returns a iterator that is rewind by n positions.
 
StringConstIteratoroperator+= (difference_type n)
 Advance iterator by n positions.
 
StringConstIteratoroperator-= (difference_type n)
 Rewind iterator by n positions.
 
value_type operator* () const
 Get pointed value.
 
value_type operator[] (difference_type i) const
 Get value by index.
 

Friends

StringConstIterator operator+ (const StringConstIterator &a, difference_type n)
 Returns a iterator resulting from a + n.
 
StringConstIterator operator+ (difference_type n, const StringConstIterator &a)
 Returns a iterator resulting from n + a.
 
difference_type operator- (const StringConstIterator &b, const StringConstIterator &a)
 Returns the difference resulting from b - a.
 
bool operator== (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a refers to same item than iterator b.
 
bool operator!= (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a refers not to same item than iterator b.
 
bool operator< (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a refers to a element prior to item referenced by iterator b.
 
bool operator<= (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a <= iterator b.
 
bool operator> (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a > iterator b.
 
bool operator>= (const StringConstIterator &a, const StringConstIterator &b)
 Returns true if iterator a >= iterator b.
 

Detailed Description

Iterator that acts on QString.

Iterator that can be used by parsers based on Boost.Spirit to be able to parse QString directly.

Boost.Spirit handles wchar_t and std::wstring, but not QString. The trick here is when accessing the item of the iterator, QChar::unicode() is invoked. This way, Spirit sees wchar_t and can do needed comparisons.

Definition at line 45 of file StringConstIterator.h.

Constructor & Destructor Documentation

Mdt::PlainText::StringConstIterator::StringConstIterator ( )
inline

Default constructor.

Construct a invalid iterator

Definition at line 59 of file StringConstIterator.h.


The documentation for this struct was generated from the following file: