GG::Font::Substring Class Reference

A range of iterators into a std::string that defines a substring found in a string being rendered by Font. More...

#include <Font.h>

List of all members.

Public Member Functions

 Substring ()
 Substring (const std::string &str_, std::string::const_iterator first_, std::string::const_iterator second_)
 Substring (const std::string &str_, const IterPair &pair)
std::string::const_iterator begin () const
std::string::const_iterator end () const
bool empty () const
std::size_t size () const
 operator std::string () const
bool operator== (const std::string &rhs) const
bool operator!= (const std::string &rhs) const
Substringoperator+= (const IterPair &rhs)


Detailed Description

A range of iterators into a std::string that defines a substring found in a string being rendered by Font.

Due to the requirements of serializing Substring, it must contain a reference to the string of which it is a substring.

Definition at line 131 of file Font.h.


Constructor & Destructor Documentation

GG::Font::Substring::Substring (  ) 

Default ctor.

GG::Font::Substring::Substring ( const std::string &  str_,
std::string::const_iterator  first_,
std::string::const_iterator  second_ 
)

Ctor. first_ must be <= second_.

GG::Font::Substring::Substring ( const std::string &  str_,
const IterPair &  pair 
)

Construction from base. pair.first must be <= pair.second.


Member Function Documentation

std::string::const_iterator GG::Font::Substring::begin (  )  const

Returns an iterator to the beginning of the substring.

std::string::const_iterator GG::Font::Substring::end (  )  const

Returns an iterator to one-past-the-end of the substring.

bool GG::Font::Substring::empty (  )  const

True iff .first == .second.

std::size_t GG::Font::Substring::size (  )  const

Length, in original string chars, of the substring.

GG::Font::Substring::operator std::string (  )  const

Implicit conversion to std::string.

bool GG::Font::Substring::operator== ( const std::string &  rhs  )  const

Comparison with std::string.

bool GG::Font::Substring::operator!= ( const std::string &  rhs  )  const

Comparison with std::string.

Substring& GG::Font::Substring::operator+= ( const IterPair &  rhs  ) 

Concatenation with base. rhs.first must be <= rhs.second. .second must be equal to rhs.first (*this and rhs must be contiguous).


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

Generated on Sat Mar 26 07:08:38 2011 for GG by  doxygen 1.5.9