Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Boundary Analysis

This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries. More...

Classes

class  boost::locale::boundary::boundary_point< IteratorType >
 This class represents a boundary point in the text. More...
 
struct  boost::locale::boundary::break_info
 This structure is used for representing boundary point that follows the offset. More...
 
singleton  boost::locale::boundary::boundary_indexing< CharType >
 
class  boost::locale::boundary::boundary_indexing< char >
 
class  boost::locale::boundary::boundary_indexing< wchar_t >
 
class  boost::locale::boundary::segment_index< BaseIterator >
 This class holds an index of segments in the text range and allows to iterate over them. More...
 
class  boost::locale::boundary::boundary_point_index< BaseIterator >
 This class holds an index of boundary points and allows iterating over them. More...
 
class  boost::locale::boundary::segment< IteratorType >
 a segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it. More...
 

Typedefs

typedef std::vector< break_info > boost::locale::boundary::index_type
 This type holds the analysis of the text - all its break points with marks. More...
 
typedef BaseIterator boost::locale::boundary::segment_index< BaseIterator >::base_iterator
 The type of the iterator used to iterate over the original text. More...
 
typedef
details::segment_index_iterator
< base_iterator > 
boost::locale::boundary::segment_index< BaseIterator >::iterator
 
typedef
details::segment_index_iterator
< base_iterator > 
boost::locale::boundary::segment_index< BaseIterator >::const_iterator
 
typedef segment< base_iterator > boost::locale::boundary::segment_index< BaseIterator >::value_type
 The type dereferenced by the iterator and const_iterator. More...
 
typedef BaseIterator boost::locale::boundary::boundary_point_index< BaseIterator >::base_iterator
 The type of the iterator used to iterate over the original text. More...
 
typedef
details::boundary_point_index_iterator
< base_iterator > 
boost::locale::boundary::boundary_point_index< BaseIterator >::iterator
 
typedef
details::boundary_point_index_iterator
< base_iterator > 
boost::locale::boundary::boundary_point_index< BaseIterator >::const_iterator
 
typedef boundary_point
< base_iterator > 
boost::locale::boundary::boundary_point_index< BaseIterator >::value_type
 The type dereferenced by the iterator and const_iterator. More...
 
typedef segment_index
< std::string::const_iterator > 
boost::locale::boundary::ssegment_index
 convenience typedef More...
 
typedef segment_index
< std::wstring::const_iterator > 
boost::locale::boundary::wssegment_index
 convenience typedef More...
 
typedef segment_index< char
const * > 
boost::locale::boundary::csegment_index
 convenience typedef More...
 
typedef segment_index< wchar_t
const * > 
boost::locale::boundary::wcsegment_index
 convenience typedef More...
 
typedef boundary_point_index
< std::string::const_iterator > 
boost::locale::boundary::sboundary_point_index
 convenience typedef More...
 
typedef boundary_point_index
< std::wstring::const_iterator > 
boost::locale::boundary::wsboundary_point_index
 convenience typedef More...
 
typedef boundary_point_index
< char const * > 
boost::locale::boundary::cboundary_point_index
 convenience typedef More...
 
typedef boundary_point_index
< wchar_t const * > 
boost::locale::boundary::wcboundary_point_index
 convenience typedef More...
 
typedef segment
< std::string::const_iterator > 
boost::locale::boundary::ssegment
 convenience typedef More...
 
typedef segment
< std::wstring::const_iterator > 
boost::locale::boundary::wssegment
 convenience typedef More...
 
typedef segment< char const * > boost::locale::boundary::csegment
 convenience typedef More...
 
typedef segment< wchar_t const * > boost::locale::boundary::wcsegment
 convenience typedef More...
 
typedef uint32_t boost::locale::boundary::rule_type
 Flags used with word boundary analysis – the type of the word, line or sentence boundary found. More...
 

Enumerations

enum  boost::locale::boundary::boundary_type {
  boost::locale::boundary::character,
  boost::locale::boundary::word,
  boost::locale::boundary::sentence,
  boost::locale::boundary::line
}
 This type describes a possible boundary analysis alternatives. More...
 

Functions

template<typename BaseIterator >
bool boost::locale::boundary::operator== (BaseIterator const &l, boundary_point< BaseIterator > const &r)
 Check if the boundary point r points to same location as an iterator l. More...
 
template<typename BaseIterator >
bool boost::locale::boundary::operator!= (BaseIterator const &l, boundary_point< BaseIterator > const &r)
 Check if the boundary point r points to different location from an iterator l. More...
 
 boost::locale::boundary::segment_index< BaseIterator >::segment_index ()
 Default constructor. More...
 
 boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
 Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc. More...
 
 boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
 Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible segments (full mask) for locale loc. More...
 
 boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_point_index< base_iterator > const &)
 Create a segment_index from a boundary_point_index. More...
 
segment_index const & boost::locale::boundary::segment_index< BaseIterator >::operator= (boundary_point_index< base_iterator > const &)
 Copy an index from a boundary_point_index. More...
 
void boost::locale::boundary::segment_index< BaseIterator >::map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
 Create a new index for boundary analysis type of the text in range [begin,end) for locale loc. More...
 
iterator boost::locale::boundary::segment_index< BaseIterator >::begin () const
 Get the iterator on the beginning of the segments range. More...
 
iterator boost::locale::boundary::segment_index< BaseIterator >::end () const
 Get the iterator on the ending of the segments range. More...
 
iterator boost::locale::boundary::segment_index< BaseIterator >::find (base_iterator p) const
 Find a first valid segment following a position p. More...
 
rule_type boost::locale::boundary::segment_index< BaseIterator >::rule () const
 Get the mask of rules that are used. More...
 
void boost::locale::boundary::segment_index< BaseIterator >::rule (rule_type v)
 Set the mask of rules that are used. More...
 
bool boost::locale::boundary::segment_index< BaseIterator >::full_select () const
 Get the full_select property value - should segment include in the range values that not belong to specific rule() or not. More...
 
void boost::locale::boundary::segment_index< BaseIterator >::full_select (bool v)
 Set the full_select property value - should segment include in the range values that not belong to specific rule() or not. More...
 
 boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ()
 Default constructor. More...
 
 boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
 Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc. More...
 
 boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
 Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible boundary points (full mask) for locale loc. More...
 
 boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (segment_index< base_iterator > const &other)
 Create a boundary_point_index from a segment_index. More...
 
boundary_point_index const & boost::locale::boundary::boundary_point_index< BaseIterator >::operator= (segment_index< base_iterator > const &other)
 Copy a boundary_point_index from a segment_index. More...
 
void boost::locale::boundary::boundary_point_index< BaseIterator >::map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
 Create a new index for boundary analysis type of the text in range [begin,end) for locale loc. More...
 
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::begin () const
 Get the iterator on the beginning of the boundary points range. More...
 
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::end () const
 Get the iterator on the ending of the boundary points range. More...
 
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::find (base_iterator p) const
 Find a first valid boundary point on a position p or following it. More...
 
rule_type boost::locale::boundary::boundary_point_index< BaseIterator >::rule () const
 Get the mask of rules that are used. More...
 
void boost::locale::boundary::boundary_point_index< BaseIterator >::rule (rule_type v)
 Set the mask of rules that are used. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator== (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator!= (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator< (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator<= (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator> (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator>= (segment< IteratorL > const &l, segment< IteratorR > const &r)
 Compare two segments. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator== (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator!= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator< (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator<= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator> (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator>= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator== (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator!= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator< (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator<= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator> (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator>= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
 Compare string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator== (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator!= (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator< (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator<= (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator> (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator>= (CharType const *l, segment< IteratorR > const &r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator== (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator!= (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator< (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator<= (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator> (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator>= (segment< Iterator > const &l, CharType const *r)
 Compare C string and segment. More...
 
template<typename CharType , typename TraitsType , typename Iterator >
std::basic_ostream< CharType,
TraitsType > & 
boost::locale::boundary::operator<< (std::basic_ostream< CharType, TraitsType > &out, segment< Iterator > const &tok)
 Write the segment to the stream character by character. More...
 
rule_type boost::locale::boundary::boundary_rule (boundary_type t)
 This function returns the mask that covers all variants for specific boundary type. More...
 

Friends

class boost::locale::boundary::segment_index< BaseIterator >::boundary_point_index< base_iterator >
 
class boost::locale::boundary::boundary_point_index< BaseIterator >::segment_index< base_iterator >
 

Detailed Description

This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries.

This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries.

Typedef Documentation

template<typename BaseIterator>
typedef BaseIterator boost::locale::boundary::segment_index< BaseIterator >::base_iterator

The type of the iterator used to iterate over the original text.

template<typename BaseIterator>
typedef BaseIterator boost::locale::boundary::boundary_point_index< BaseIterator >::base_iterator

The type of the iterator used to iterate over the original text.

typedef boundary_point_index<char const *> boost::locale::boundary::cboundary_point_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

template<typename BaseIterator>
typedef details::segment_index_iterator<base_iterator> boost::locale::boundary::segment_index< BaseIterator >::const_iterator
template<typename BaseIterator>
typedef details::boundary_point_index_iterator<base_iterator> boost::locale::boundary::boundary_point_index< BaseIterator >::const_iterator
typedef segment<char const *> boost::locale::boundary::csegment

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

convenience typedef

typedef segment_index<char const *> boost::locale::boundary::csegment_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

typedef std::vector<break_info> boost::locale::boundary::index_type

#include <boost_1_57_0/boost/locale/boundary/facets.hpp>

This type holds the analysis of the text - all its break points with marks.

template<typename BaseIterator>
typedef details::segment_index_iterator<base_iterator> boost::locale::boundary::segment_index< BaseIterator >::iterator
template<typename BaseIterator>
typedef details::boundary_point_index_iterator<base_iterator> boost::locale::boundary::boundary_point_index< BaseIterator >::iterator

#include <boost_1_57_0/boost/locale/boundary/types.hpp>

Flags used with word boundary analysis – the type of the word, line or sentence boundary found.

It is a bit-mask that represents various combinations of rules used to select this specific boundary.

typedef boundary_point_index<std::string::const_iterator> boost::locale::boundary::sboundary_point_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

typedef segment<std::string::const_iterator> boost::locale::boundary::ssegment

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

convenience typedef

typedef segment_index<std::string::const_iterator> boost::locale::boundary::ssegment_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

template<typename BaseIterator>
typedef segment<base_iterator> boost::locale::boundary::segment_index< BaseIterator >::value_type

The type dereferenced by the iterator and const_iterator.

It is an object that represents selected segment.

template<typename BaseIterator>
typedef boundary_point<base_iterator> boost::locale::boundary::boundary_point_index< BaseIterator >::value_type

The type dereferenced by the iterator and const_iterator.

It is an object that represents the selected boundary point.

typedef boundary_point_index<wchar_t const *> boost::locale::boundary::wcboundary_point_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

typedef segment<wchar_t const *> boost::locale::boundary::wcsegment

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

convenience typedef

typedef segment_index<wchar_t const *> boost::locale::boundary::wcsegment_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

typedef boundary_point_index<std::wstring::const_iterator> boost::locale::boundary::wsboundary_point_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

typedef segment<std::wstring::const_iterator> boost::locale::boundary::wssegment

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

convenience typedef

typedef segment_index<std::wstring::const_iterator> boost::locale::boundary::wssegment_index

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

convenience typedef

Enumeration Type Documentation

#include <boost_1_57_0/boost/locale/boundary/types.hpp>

This type describes a possible boundary analysis alternatives.

Enumerator
character 

Analyse the text for character boundaries.

word 

Analyse the text for word boundaries.

sentence 

Analyse the text for Find sentence boundaries.

line 

Analyse the text for positions suitable for line breaks.

Function Documentation

template<typename BaseIterator>
boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ( )
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Default constructor.

Note

When this object is constructed by default it does not include a valid index, thus calling begin(), end() or find() member functions would lead to undefined behavior

template<typename BaseIterator>
boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
rule_type  mask,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc.

template<typename BaseIterator>
boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible boundary points (full mask) for locale loc.

template<typename BaseIterator>
boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ( segment_index< base_iterator > const &  other)

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a boundary_point_index from a segment_index.

It copies all indexing information and uses the default rule (all possible boundary points)

This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

Note
rule() flags are not copied
template<typename BaseIterator>
boost::locale::boundary::segment_index< BaseIterator >::segment_index ( )
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Default constructor.

Note

When this object is constructed by default it does not include a valid index, thus calling begin(), end() or find() member functions would lead to undefined behavior

template<typename BaseIterator>
boost::locale::boundary::segment_index< BaseIterator >::segment_index ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
rule_type  mask,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc.

template<typename BaseIterator>
boost::locale::boundary::segment_index< BaseIterator >::segment_index ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible segments (full mask) for locale loc.

template<typename BaseIterator>
boost::locale::boundary::segment_index< BaseIterator >::segment_index ( boundary_point_index< base_iterator > const &  )

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a segment_index from a boundary_point_index.

It copies all indexing information and used default rule (all possible segments)

This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

Note
rule() flags are not copied
template<typename BaseIterator>
iterator boost::locale::boundary::segment_index< BaseIterator >::begin ( void  ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the iterator on the beginning of the segments range.

Preconditions: the segment_index should have a mapping

Note

The returned iterator is invalidated by access to any non-const member functions of this object

template<typename BaseIterator>
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::begin ( void  ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the iterator on the beginning of the boundary points range.

Preconditions: this boundary_point_index should have a mapping

Note

The returned iterator is invalidated by access to any non-const member functions of this object

rule_type boost::locale::boundary::boundary_rule ( boundary_type  t)
inline

#include <boost_1_57_0/boost/locale/boundary/types.hpp>

This function returns the mask that covers all variants for specific boundary type.

References boost::locale::boundary::character, boost::locale::boundary::line, boost::locale::boundary::sentence, and boost::locale::boundary::word.

template<typename BaseIterator>
iterator boost::locale::boundary::segment_index< BaseIterator >::end ( void  ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the iterator on the ending of the segments range.

Preconditions: the segment_index should have a mapping

The returned iterator is invalidated by access to any non-const member functions of this object

template<typename BaseIterator>
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::end ( void  ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the iterator on the ending of the boundary points range.

Preconditions: this boundary_point_index should have a mapping

Note

The returned iterator is invalidated by access to any non-const member functions of this object

template<typename BaseIterator>
iterator boost::locale::boundary::segment_index< BaseIterator >::find ( base_iterator  p) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Find a first valid segment following a position p.

If p is inside a valid segment this segment is selected:

For example: For word boundary analysis with word_any rule():

  • "to| be or ", would point to "be",
  • "t|o be or ", would point to "to",
  • "to be or| ", would point to end.

Preconditions: the segment_index should have a mapping and p should be valid iterator to the text in the mapped range.

The returned iterator is invalidated by access to any non-const member functions of this object

template<typename BaseIterator>
iterator boost::locale::boundary::boundary_point_index< BaseIterator >::find ( base_iterator  p) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Find a first valid boundary point on a position p or following it.

For example: For word boundary analysis of the text "to be or"

  • "|to be", would return boundary point at "|to be",
  • "t|o be", would point to "to| be"

Preconditions: the boundary_point_index should have a mapping and p should be valid iterator to the text in the mapped range.

The returned iterator is invalidated by access to any non-const member functions of this object

template<typename BaseIterator>
bool boost::locale::boundary::segment_index< BaseIterator >::full_select ( ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the full_select property value - should segment include in the range values that not belong to specific rule() or not.

The default value is false.

For example for sentence boundary with rule sentence_term the segments of text "Hello! How\nare you?" are "Hello!\", "are you?" when full_select() is false because "How\n" is selected as sentence by a rule spits the text by line feed. If full_select() is true the returned segments are "Hello! ", "How\nare you?" where "How\n" is joined with the following part "are you?"

template<typename BaseIterator>
void boost::locale::boundary::segment_index< BaseIterator >::full_select ( bool  v)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Set the full_select property value - should segment include in the range values that not belong to specific rule() or not.

The default value is false.

For example for sentence boundary with rule sentence_term the segments of text "Hello! How\nare you?" are "Hello!\", "are you?" when full_select() is false because "How\n" is selected as sentence by a rule spits the text by line feed. If full_select() is true the returned segments are "Hello! ", "How\nare you?" where "How\n" is joined with the following part "are you?"

template<typename BaseIterator>
void boost::locale::boundary::segment_index< BaseIterator >::map ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a new index for boundary analysis type of the text in range [begin,end) for locale loc.

Note
rule() and full_select() remain unchanged.
template<typename BaseIterator>
void boost::locale::boundary::boundary_point_index< BaseIterator >::map ( boundary_type  type,
base_iterator  begin,
base_iterator  end,
std::locale const &  loc = std::locale() 
)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Create a new index for boundary analysis type of the text in range [begin,end) for locale loc.

Note
rule() remains unchanged.
template<typename BaseIterator >
bool boost::locale::boundary::operator!= ( BaseIterator const &  l,
boundary_point< BaseIterator > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/boundary_point.hpp>

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

template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator!= ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator!= ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator!= ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator!= ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator!= ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator< ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator< ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator< ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator< ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator< ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename CharType , typename TraitsType , typename Iterator >
std::basic_ostream<CharType,TraitsType>& boost::locale::boundary::operator<< ( std::basic_ostream< CharType, TraitsType > &  out,
segment< Iterator > const &  tok 
)
template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator<= ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator<= ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator<= ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator<= ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator<= ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename BaseIterator>
segment_index const& boost::locale::boundary::segment_index< BaseIterator >::operator= ( boundary_point_index< base_iterator > const &  )

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Copy an index from a boundary_point_index.

It copies all indexing information and uses the default rule (all possible segments)

This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

Note
rule() flags are not copied
template<typename BaseIterator>
boundary_point_index const& boost::locale::boundary::boundary_point_index< BaseIterator >::operator= ( segment_index< base_iterator > const &  other)

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Copy a boundary_point_index from a segment_index.

It copies all indexing information and keeps the current rule() unchanged

This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

Note
rule() flags are not copied
template<typename BaseIterator >
bool boost::locale::boundary::operator== ( BaseIterator const &  l,
boundary_point< BaseIterator > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/boundary_point.hpp>

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

template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator== ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator== ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator== ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator== ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator== ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator> ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator> ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator> ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator> ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator> ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename IteratorL , typename IteratorR >
bool boost::locale::boundary::operator>= ( segment< IteratorL > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare two segments.

template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
bool boost::locale::boundary::operator>= ( std::basic_string< CharType, Traits, Alloc > const &  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename Iterator , typename CharType , typename Traits , typename Alloc >
bool boost::locale::boundary::operator>= ( segment< Iterator > const &  l,
std::basic_string< CharType, Traits, Alloc > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare string and segment.

template<typename CharType , typename IteratorR >
bool boost::locale::boundary::operator>= ( CharType const *  l,
segment< IteratorR > const &  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename Iterator , typename CharType >
bool boost::locale::boundary::operator>= ( segment< Iterator > const &  l,
CharType const *  r 
)

#include <boost_1_57_0/boost/locale/boundary/segment.hpp>

Compare C string and segment.

template<typename BaseIterator>
rule_type boost::locale::boundary::segment_index< BaseIterator >::rule ( ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the mask of rules that are used.

template<typename BaseIterator>
void boost::locale::boundary::segment_index< BaseIterator >::rule ( rule_type  v)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Set the mask of rules that are used.

template<typename BaseIterator>
rule_type boost::locale::boundary::boundary_point_index< BaseIterator >::rule ( ) const
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Get the mask of rules that are used.

template<typename BaseIterator>
void boost::locale::boundary::boundary_point_index< BaseIterator >::rule ( rule_type  v)
inline

#include <boost_1_57_0/boost/locale/boundary/index.hpp>

Set the mask of rules that are used.

Friends

template<typename BaseIterator>
friend class boundary_point_index< base_iterator >
friend
template<typename BaseIterator>
friend class segment_index< base_iterator >
friend