15 #ifndef Om_Sink_CodePointSink_
21 #ifndef Om_Macro_Precompilation_
23 #include "boost/test/unit_test.hpp"
31 BOOST_AUTO_TEST_SUITE(CodePointSinkTest)
33 BOOST_AUTO_TEST_CASE(GeneralTest) {
34 typedef std::back_insert_iterator<std::string> Iterator;
35 std::string theString;
36 Iterator theIterator(theString);
37 CodePointSink<Iterator> theSink(theIterator);
53 BOOST_AUTO_TEST_SUITE_END()
68 template <typename ThisCodeUnitIterator>
71 Om::Sink::CodePointSink<ThisCodeUnitIterator>
76 inline Type_::CodePointSink(ThisCodeUnitIterator theCodeUnitIterator):
77 thisCodeUnitIterator(theCodeUnitIterator) {}
80 inline Type_ & Type_::operator =(CodePointSink theCodePointSink) {
81 this->Swap(theCodePointSink);
86 inline void Type_::Push(
CodePoint const & theCodePoint) {
94 inline void Type_::Swap(CodePointSink & theCodePointSink) {
96 this->thisCodeUnitIterator,
97 theCodePointSink.thisCodeUnitIterator
106 template <
typename TheCodeUnitIterator>
111 theFirst.
Swap(theSecond);
A CodePoint Sink that pushes each code unit to the iterator.
void Swap(CodePointSink &)
boost::locale::utf::code_point CodePoint
A UTF-8 code point.
void swap(Om::Language::Expression &, Om::Language::Expression &)