![]() |
![]()
| ![]() |
![]()
NAMEunicode::linebreak_callback_base, unicode::linebreak_callback_save_buf, unicode::linebreakc_callback_base, unicode::linebreak_iter, unicode::linebreakc_iter - unicode line-breaking rules SYNOPSIS#include <courier-unicode.h> class linebreak : public unicode::linebreak_callback_base { public: DESCRIPTIONunicode::linebreak_callback_base is a C++ binding for the unicode line-breaking rule implementation described in unicode_line_break(3). Subclass unicode::linebreak_callback_base and implement callback() that's virtually inherited from unicode::linebreak_callback_base. The callback() callback function receives the output values from the line-breaking algorithm, the UNICODE_LB_MANDATORY, UNICODE_LB_NONE, or the UNICODE_LB_ALLOWED value, for each unicode character. callback() should return 0. A non-zero return reports an error, that stops the line-breaking algorithm. See unicode_line_break(3) for more information. The alternate unicode::linebreakc_callback_base interface uses a virtually inherited callback() that receives two parameters, the line-break code value, and the corresponding unicode character. The input unicode characters for the line-breaking algorithm are provided by the << operator, one unicode character at a time; or by the () operator, passing either a container, or a beginning and an ending iterator value for an input sequence of unicode characters. finish() indicates the end of the unicode character sequence. set_opts sets line-breaking options (see unicode_lb_set_opts() for more information). unicode::linebreak_callback_save_buf is a subclass that implements callback() by saving the linebreaks codes into a std::list. The linebreak_iter template implements an input iterator over ints. The template parameter is an input iterator over unicode chars. The constructor's parameters are a beginning and an ending iterator value for a sequence of char32_t. This constructs the beginning iterator value for a sequence of ints consisting of line-break values (UNICODE_LB_MANDATORY, UNICODE_LB_NONE, or UNICODE_LB_ALLOWED) corresponding to each char32_t in the underlying sequence. The default constructor creates the ending iterator value for the sequence. The iterator implements a set_opts() methods that sets the options for the line-breaking algorithm. The linebreakc_iter template implements a similar input iterator, with the difference that it ends up iterating over a std::pair of line-breaking values and the corresponding char32_t from the underlying input sequence. SEE ALSOcourier-unicode(7), unicode_line_break(3). AUTHORSam Varshavchik Author
|