1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED
- #define BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED
- #include <boost/locale/boundary/types.hpp>
- #include <boost/locale/detail/facet_id.hpp>
- #include <boost/locale/detail/is_supported_char.hpp>
- #include <locale>
- #include <vector>
- #ifdef BOOST_MSVC
- # pragma warning(push)
- # pragma warning(disable : 4275 4251 4231 4660)
- #endif
- namespace boost { namespace locale {
-
- namespace boundary {
-
-
-
-
-
- struct break_info {
-
- break_info() : offset(0), rule(0) {}
-
-
- break_info(size_t v) : offset(v), rule(0) {}
-
- size_t offset;
-
-
- rule_type rule;
-
-
- bool operator<(const break_info& other) const { return offset < other.offset; }
- };
-
-
- typedef std::vector<break_info> index_type;
-
-
-
- template<typename Char>
- class BOOST_SYMBOL_VISIBLE boundary_indexing : public std::locale::facet,
- public boost::locale::detail::facet_id<boundary_indexing<Char>> {
- BOOST_LOCALE_ASSERT_IS_SUPPORTED(Char);
- public:
-
- boundary_indexing(size_t refs = 0) : std::locale::facet(refs) {}
-
-
-
-
-
- virtual index_type map(boundary_type t, const Char* begin, const Char* end) const = 0;
- };
-
- }
- }}
- #ifdef BOOST_MSVC
- # pragma warning(pop)
- #endif
- #endif
|