Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

utils::utf8_iterator Class Reference

#include <string_utils.hpp>

Collaboration diagram for utils::utf8_iterator:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::input_iterator_tag iterator_category
typedef wchar_t value_type
typedef ptrdiff_t difference_type
typedef wchar_t * pointer
typedef wchar_t & reference

Public Member Functions

 utf8_iterator (const std::string &str)
 utf8_iterator (std::string::const_iterator const &begin, std::string::const_iterator const &end)
bool operator== (const utf8_iterator &a) const
bool operator!= (const utf8_iterator &a) const
utf8_iteratoroperator++ ()
wchar_t operator* () const
bool next_is_end ()
const std::pair
< std::string::const_iterator,
std::string::const_iterator > & 
substr () const

Static Public Member Functions

static utf8_iterator begin (const std::string &str)
static utf8_iterator end (const std::string &str)

Private Member Functions

void update ()

Private Attributes

wchar_t current_char
std::string::const_iterator string_end
std::pair
< std::string::const_iterator,
std::string::const_iterator > 
current_substr

Detailed Description

Definition at line 233 of file string_utils.hpp.


Member Typedef Documentation

Definition at line 238 of file string_utils.hpp.

typedef std::input_iterator_tag utils::utf8_iterator::iterator_category

Definition at line 236 of file string_utils.hpp.

Definition at line 239 of file string_utils.hpp.

Definition at line 240 of file string_utils.hpp.

Definition at line 237 of file string_utils.hpp.


Constructor & Destructor Documentation

utils::utf8_iterator::utf8_iterator ( const std::string &  str  ) 

Definition at line 566 of file string_utils.cpp.

References update().

Referenced by begin(), and end().

Here is the call graph for this function:

Here is the caller graph for this function:

utils::utf8_iterator::utf8_iterator ( std::string::const_iterator const &  begin,
std::string::const_iterator const &  end 
)

Definition at line 574 of file string_utils.cpp.

References update().

Here is the call graph for this function:


Member Function Documentation

utf8_iterator utils::utf8_iterator::begin ( const std::string &  str  )  [static]

Definition at line 583 of file string_utils.cpp.

References utf8_iterator().

Here is the call graph for this function:

utf8_iterator utils::utf8_iterator::end ( const std::string &  str  )  [static]

Definition at line 588 of file string_utils.cpp.

References utf8_iterator().

Referenced by font::cut_word(), help::get_first_word(), and split_text().

Here is the call graph for this function:

Here is the caller graph for this function:

bool utils::utf8_iterator::next_is_end (  ) 

Definition at line 610 of file string_utils.cpp.

References current_substr, and string_end.

bool utils::utf8_iterator::operator!= ( const utf8_iterator a  )  const [inline]

Definition at line 249 of file string_utils.hpp.

wchar_t utils::utf8_iterator::operator* (  )  const

Definition at line 605 of file string_utils.cpp.

References current_char.

utf8_iterator & utils::utf8_iterator::operator++ (  ) 

Definition at line 598 of file string_utils.cpp.

References current_substr, and update().

Here is the call graph for this function:

bool utils::utf8_iterator::operator== ( const utf8_iterator a  )  const

Definition at line 593 of file string_utils.cpp.

References current_substr.

const std::pair< std::string::const_iterator, std::string::const_iterator > & utils::utf8_iterator::substr (  )  const

Definition at line 617 of file string_utils.cpp.

References current_substr.

Referenced by font::cut_word(), and split_text().

Here is the caller graph for this function:

void utils::utf8_iterator::update (  )  [private]

Definition at line 622 of file string_utils.cpp.

References utils::byte_size_from_utf8_first(), current_char, current_substr, and string_end.

Referenced by operator++(), and utf8_iterator().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 257 of file string_utils.hpp.

Referenced by operator*(), and update().

std::pair<std::string::const_iterator, std::string::const_iterator> utils::utf8_iterator::current_substr [private]

Definition at line 259 of file string_utils.hpp.

Referenced by next_is_end(), operator++(), operator==(), substr(), and update().

std::string::const_iterator utils::utf8_iterator::string_end [private]

Definition at line 258 of file string_utils.hpp.

Referenced by next_is_end(), and update().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:21 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs