Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::locale::boundary::boundary_point< IteratorType > Class Template Reference

This class represents a boundary point in the text. More...

#include <boundary_point.hpp>

Public Types

typedef IteratorType iterator_type
 The type of the base iterator that iterates the original text. More...
 

Public Member Functions

 boundary_point ()
 Empty default constructor. More...
 
 boundary_point (iterator_type p, rule_type r)
 Create a new boundary_point using iterator and a rule r. More...
 
void iterator (iterator_type i)
 Set an new iterator value i. More...
 
void rule (rule_type r)
 Set an new rule value r. More...
 
iterator_type iterator () const
 Fetch an iterator. More...
 
rule_type rule () const
 Fetch a rule. More...
 
bool operator== (boundary_point const &other) const
 Check if two boundary points are the same. More...
 
bool operator!= (boundary_point const &other) const
 Check if two boundary points are different. More...
 
bool operator== (iterator_type const &other) const
 Check if the boundary point points to same location as an iterator other. More...
 
bool operator!= (iterator_type const &other) const
 Check if the boundary point points to different location from an iterator other. More...
 
 operator iterator_type () const
 Automatic cast to the iterator it represents. More...
 

Detailed Description

template<typename IteratorType>
class boost::locale::boundary::boundary_point< IteratorType >

This class represents a boundary point in the text.

It represents a pair - an iterator and a rule that defines this point.

This type of object is dereference by the iterators of boundary_point_index. Using a rule() member function you can get the reason why this specific boundary point was selected.

For example, When you use a sentence boundary analysis, the (rule() & sentence_term) != 0 means that this boundary point was selected because a sentence terminator (like .?!) was spotted and the (rule() & sentence_sep)!=0 means that a separator like line feed or carriage return was observed.

Note
  • The beginning of analyzed range is always considered a boundary point and its rule is always 0.
  • when using a word boundary analysis the returned rule relates to a chunk of text preceding this point.
See also

Member Typedef Documentation

template<typename IteratorType>
typedef IteratorType boost::locale::boundary::boundary_point< IteratorType >::iterator_type

The type of the base iterator that iterates the original text.

Constructor & Destructor Documentation

template<typename IteratorType>
boost::locale::boundary::boundary_point< IteratorType >::boundary_point ( )
inline

Empty default constructor.

template<typename IteratorType>
boost::locale::boundary::boundary_point< IteratorType >::boundary_point ( iterator_type  p,
rule_type  r 
)
inline

Create a new boundary_point using iterator and a rule r.

Member Function Documentation

template<typename IteratorType>
void boost::locale::boundary::boundary_point< IteratorType >::iterator ( iterator_type  i)
inline

Set an new iterator value i.

References boost::multiprecision::backends::i.

template<typename IteratorType>
iterator_type boost::locale::boundary::boundary_point< IteratorType >::iterator ( ) const
inline

Fetch an iterator.

template<typename IteratorType>
boost::locale::boundary::boundary_point< IteratorType >::operator iterator_type ( ) const
inline

Automatic cast to the iterator it represents.

template<typename IteratorType>
bool boost::locale::boundary::boundary_point< IteratorType >::operator!= ( boundary_point< IteratorType > const &  other) const
inline

Check if two boundary points are different.

References boost::spirit::x3::unicode::other.

template<typename IteratorType>
bool boost::locale::boundary::boundary_point< IteratorType >::operator!= ( iterator_type const &  other) const
inline

Check if the boundary point points to different location from an iterator other.

References boost::spirit::x3::unicode::other.

template<typename IteratorType>
bool boost::locale::boundary::boundary_point< IteratorType >::operator== ( boundary_point< IteratorType > const &  other) const
inline

Check if two boundary points are the same.

template<typename IteratorType>
bool boost::locale::boundary::boundary_point< IteratorType >::operator== ( iterator_type const &  other) const
inline

Check if the boundary point points to same location as an iterator other.

References boost::spirit::x3::unicode::other.

template<typename IteratorType>
void boost::locale::boundary::boundary_point< IteratorType >::rule ( rule_type  r)
inline

Set an new rule value r.

template<typename IteratorType>
rule_type boost::locale::boundary::boundary_point< IteratorType >::rule ( ) const
inline

Fetch a rule.


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