Om
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Om::Source::CodePointStringBackSource< ThisStringIterator > Class Template Reference

A Source of CodePoint strings from the back of a string. More...

#include "code_point_string_back_source.hpp"

+ Inheritance diagram for Om::Source::CodePointStringBackSource< ThisStringIterator >:
+ Collaboration diagram for Om::Source::CodePointStringBackSource< ThisStringIterator >:

Public Member Functions

 CodePointStringBackSource (ThisStringIterator theStringStart, ThisStringIterator const theStringEnd)
 
CodePointStringBackSourceoperator= (CodePointStringBackSource)
 
virtual bool operator! () const
 
virtual std::string & operator* () const
 
bool Equals (CodePointStringBackSource const &) const
 
virtual void Pop ()
 Pops the current item. More...
 
void Swap (CodePointStringBackSource &)
 
- Public Member Functions inherited from Om::Source::DefaultSource< std::string, CodePointStringBackSource< ThisStringIterator > >
virtual ~DefaultSource ()=0
 
CodePointStringBackSource< ThisStringIterator > & operator++ ()
 Pulls the next item from the Source. More...
 
CodePointStringBackSource< ThisStringIterator > operator++ (int)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual bool Equals (Source< std::string > const &) const
 
bool Equals (CodePointStringBackSource< ThisStringIterator > const &) const
 
- Public Member Functions inherited from Om::Source::Source< ThisItem >
virtual ~Source ()=0
 
ThisItem * operator-> () const
 
 operator Boolean () const
 Implements the Safe Boolean idiom. More...
 
virtual bool Equals (Source const &) const =0
 

Private Member Functions

void Update ()
 Populates the CodePoint string with each code unit of the next CodePoint. More...
 

Private Attributes

ThisStringIterator thisStringIterator
 
ThisStringIterator thisCodePointIterator
 The current CodePoint string iterator. More...
 
ThisStringIterator thisCodePointEnd
 The current CodePoint string end. More...
 
std::string thisCodePoint
 The current CodePoint string. More...
 

Additional Inherited Members

- Public Types inherited from Om::Source::Source< ThisItem >
typedef void(Source::* Boolean) () const
 The implementation of the Safe Boolean idiom. More...
 

Detailed Description

template<typename ThisStringIterator>
class Om::Source::CodePointStringBackSource< ThisStringIterator >

Note
Const methods are not thread-safe due to a non-mutexed mutable member.
Dereferencing exposes a reference to the member string cache of the current segment. Modifying the string will not modify the source data.

Definition at line 43 of file code_point_string_back_source.hpp.

Constructor & Destructor Documentation

◆ CodePointStringBackSource()

template<typename ThisStringIterator >
Om::Source::CodePointStringBackSource< ThisStringIterator >::CodePointStringBackSource ( ThisStringIterator  theStringStart,
ThisStringIterator const  theStringEnd 
)
Parameters
theStringStartThe string start.
theStringEndThe string end.

Member Function Documentation

◆ operator=()

template<typename ThisStringIterator >
CodePointStringBackSource& Om::Source::CodePointStringBackSource< ThisStringIterator >::operator= ( CodePointStringBackSource< ThisStringIterator >  )

◆ operator!()

template<typename ThisStringIterator >
virtual bool Om::Source::CodePointStringBackSource< ThisStringIterator >::operator! ( ) const
virtual
Returns
True if empty.

Implements Om::Source::Source< ThisItem >.

◆ operator*()

template<typename ThisStringIterator >
virtual std::string& Om::Source::CodePointStringBackSource< ThisStringIterator >::operator* ( ) const
virtual

◆ Equals()

template<typename ThisStringIterator >
bool Om::Source::CodePointStringBackSource< ThisStringIterator >::Equals ( CodePointStringBackSource< ThisStringIterator > const &  ) const

◆ Pop()

template<typename ThisStringIterator >
virtual void Om::Source::CodePointStringBackSource< ThisStringIterator >::Pop ( )
virtual
Precondition
Not empty.

Implements Om::Source::Source< ThisItem >.

◆ Swap()

template<typename ThisStringIterator >
void Om::Source::CodePointStringBackSource< ThisStringIterator >::Swap ( CodePointStringBackSource< ThisStringIterator > &  )

◆ Update()

template<typename ThisStringIterator >
void Om::Source::CodePointStringBackSource< ThisStringIterator >::Update ( )
private

Member Data Documentation

◆ thisStringIterator

template<typename ThisStringIterator >
ThisStringIterator Om::Source::CodePointStringBackSource< ThisStringIterator >::thisStringIterator
private

Definition at line 87 of file code_point_string_back_source.hpp.

◆ thisCodePointIterator

template<typename ThisStringIterator >
ThisStringIterator Om::Source::CodePointStringBackSource< ThisStringIterator >::thisCodePointIterator
private

Definition at line 93 of file code_point_string_back_source.hpp.

◆ thisCodePointEnd

template<typename ThisStringIterator >
ThisStringIterator Om::Source::CodePointStringBackSource< ThisStringIterator >::thisCodePointEnd
private

Definition at line 99 of file code_point_string_back_source.hpp.

◆ thisCodePoint

template<typename ThisStringIterator >
std::string Om::Source::CodePointStringBackSource< ThisStringIterator >::thisCodePoint
mutableprivate

Definition at line 105 of file code_point_string_back_source.hpp.


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