Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Friends | List of all members
CoreBasicStringIterator< CONST > Class Template Reference

Public Types

using difference_type = ptrdiff_t
 
using value_type = char
 
using pointer = char *
 
using reference = char &
 
using iterator_category = std::random_access_iterator_tag
 

Public Member Functions

 CoreBasicStringIterator (void)
 Default Constructor (needed by Swig ...)
 
CoreBasicStringIteratoroperator++ (void)
 Pre-increment operator.
 
CoreBasicStringIterator operator++ (int)
 Post-increment operator.
 
CoreBasicStringIteratoroperator-- (void)
 Pre-decrement operator.
 
CoreBasicStringIterator operator-- (int)
 Post-decrement operator.
 
CoreBasicStringIteratoroperator= (const CoreBasicStringIterator &other)
 Assignment operator.
 
bool operator== (const CoreBasicStringIterator &other) const
 Equality operator.
 
bool operator!= (const CoreBasicStringIterator &other) const
 Inequality operator.
 
bool operator< (const CoreBasicStringIterator &other) const
 const inequality operators a < b.
 
bool operator<= (const CoreBasicStringIterator &other) const
 const inequality operators a <= b.
 
bool operator> (const CoreBasicStringIterator &other) const
 const inequality operators a > b.
 
bool operator>= (const CoreBasicStringIterator &other) const
 const inequality operators a >= b.
 
template<bool T = IX_CONST, typename = typename core_enable_if<T == false>::type>
char & operator* (void)
 Dereference operator. This one is only generated if IX_CONST is false.
 
const char & operator* (void) const
 Const-dereference operator.
 
CoreBasicStringIterator operator+ (difference_type increment) const
 Const arithmetic operators +.
 
CoreBasicStringIterator operator- (difference_type decrement) const
 Const arithmetic operators -.
 
ptrdiff_t operator- (const CoreBasicStringIterator &other) const
 const arithmetic operators - between two iterators. It returns the number of element between those two iterators..
 
CoreBasicStringIteratoroperator+= (difference_type increment)
 operators a += b.
 
CoreBasicStringIteratoroperator-= (difference_type decrement)
 operators a -= b.
 
template<bool T = IX_CONST, typename = typename core_enable_if<T == false>::type>
char & operator[] (difference_type offset)
 offset dereference operator. This one is only generated if IX_CONST is false.
 
const char & operator[] (difference_type offset) const
 const offset dereference operator.
 

Friends

class CoreBasicString
 
class CoreString
 
CoreBasicStringIterator operator+ (difference_type increment, const CoreBasicStringIterator &iterator)
 External + operator (invoked when the iterator instance is on the right side of the + and the left side is an integer)
 

Detailed Description

template<bool CONST>
class CoreBasicStringIterator< CONST >

Iterator on a CoreBasicString class.

All the necessary operators to be compliant with the std random access iterator have been implemented. http://www.cplusplus.com/reference/iterator/

Template Parameters
IX_CONSTIf true, the iterator can't deference to a modifiable char. See CoreBasicString's const and non-const begin and end methods.
Note
The name "IX_CONST" is very important because "CONST" is a #define in Windows, causing the template type to always evaluate to false and skipping the generation of non-const methods. The symptom was that a non-const string had only const iterators, causing error C3892 "you cannot assign to a variable that is const".