tetengo 1.9.2
A multipurpose library set
Loading...
Searching...
No Matches
grapheme_segment.hpp
Go to the documentation of this file.
1
6
7#if !defined(TETENGO_TEXT_GRAPHEMESPLITTING_GRAPHEMESEGMENT_HPP)
8#define TETENGO_TEXT_GRAPHEMESPLITTING_GRAPHEMESEGMENT_HPP
9
10#include <cstddef>
11#include <memory>
12#include <vector>
13
14#include <boost/core/noncopyable.hpp>
15
16
18{
22 class grapheme_segment : private boost::noncopyable
23 {
24 public:
25 // types
26
45
46
47 // static functions
48
54 static const grapheme_segment& instance();
55
56
57 // constructors and destructor
58
63
64
65 // functions
66
98 std::vector<std::size_t> segment_offsets(const std::vector<break_property_type>& break_properties) const;
99
100
101 private:
102 // types
103
104 class impl;
105
106
107 // variables
108
109 const std::unique_ptr<impl> m_p_impl;
110
111
112 // constructors
113
114 grapheme_segment();
115 };
116
117
118}
119
120
121#endif
static const grapheme_segment & instance()
Returns the instance.
~grapheme_segment()
Destroys the grapheme segment.
break_property_type
A break peoperty type.
Definition grapheme_segment.hpp:29
@ spacing_mark
SpacingMark.
Definition grapheme_segment.hpp:37
std::vector< std::size_t > segment_offsets(const std::vector< break_property_type > &break_properties) const
Returns the grapheme offsets.
A grapheme splitting library.