Go to the documentation of this file.
91 virtual const char*
what()
const throw() {
return (
const char*)message;}
95 message = g_strdup(e.message);
100 message(g_strdup_printf(
"Utf8::ConversionError: %s", msg)) {}
102 message(g_strdup_printf(
"Utf8::ConversionError: %s", error->message)) {}
279 return g_utf8_validate(text.data(), text.size(), 0);
362 class ReverseIterator;
373 std::string::const_iterator pos;
494 std::string::const_iterator
base()
const {
return pos;}
511 Iterator(
const std::string::const_iterator& iter): pos(iter) {}
528 Iterator(
const std::string::iterator& iter): pos(iter) {}
567 const std::string::value_type* tmp = &(*pos);
571 pos += g_utf8_next_char(tmp) - tmp;
584 const std::string::value_type* tmp = &(*(pos-1));
586 pos -= tmp - g_utf8_prev_char(tmp);
604 return (iter1.
base() == iter2.
base());
615 return (iter1.
base() != iter2.
base());
626 return (iter1.
base() < iter2.
base());
637 return (iter1.
base() <= iter2.
base());
648 return (iter1.
base() > iter2.
base());
659 return (iter1.
base() >= iter2.
base());
721 std::string::const_iterator pos;
723 mutable std::string::const_iterator cache;
856 std::string::const_iterator
base()
const {
return pos;}
931 if (pos > cache) pos = cache;
936 const std::string::value_type* tmp = &(*(pos-1));
938 pos -= tmp - g_utf8_prev_char(tmp);
951 const std::string::value_type* tmp = &(*pos);
955 pos += g_utf8_next_char(tmp) - tmp;
969 return g_utf8_get_char(&(*(tmp.
base())));
980 return (iter1.
base() == iter2.
base());
991 return (iter1.
base() != iter2.
base());
1005 return (iter1.
base() > iter2.
base());
1019 return (iter1.
base() >= iter2.
base());
1033 return (iter1.
base() < iter2.
base());
1047 return (iter1.
base() <= iter2.
base());
gunichar reference
Definition: convert.h:715
bool operator>=(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:658
ReverseIterator(const std::string::reverse_iterator &iter)
Definition: convert.h:890
std::string wide_to_utf8(const std::wstring &input)
std::string::const_iterator base() const
Definition: convert.h:856
Definition: application.h:45
ReverseIterator & operator=(const Iterator &iter)
Definition: convert.h:831
gunichar reference
Definition: convert.h:367
ConversionError(const ConversionError &e)
Definition: convert.h:98
~ConversionError()
Definition: convert.h:103
ReverseIterator & operator=(const std::string::reverse_iterator &iter)
Definition: convert.h:804
ConversionError(const char *msg)
Definition: convert.h:99
Iterator(const Iterator &iter)
Definition: convert.h:539
Iterator()
Definition: convert.h:559
std::string::difference_type difference_type
Definition: convert.h:717
ReverseIterator(const std::string::const_reverse_iterator &iter)
Definition: convert.h:873
bool validate(const std::string &text)
Definition: convert.h:278
A class which will iterate in reverse through a std::string object by reference to unicode characters...
Definition: convert.h:712
std::string locale_from_utf8(const std::string &input)
std::string locale_to_utf8(const std::string &input)
ReverseIterator & operator=(const std::string::const_reverse_iterator &iter)
Definition: convert.h:790
ReverseIterator & operator--()
Definition: convert.h:949
bool operator==(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:603
ConversionError & operator=(const ConversionError &e)
Definition: convert.h:93
void pointer
Definition: convert.h:368
Iterator & operator=(const std::string::const_iterator &iter)
Definition: convert.h:432
ReverseIterator(const ReverseIterator &iter)
Definition: convert.h:901
bool operator<(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:625
Iterator & operator=(const Iterator &iter)
Definition: convert.h:458
std::string::difference_type difference_type
Definition: convert.h:369
std::wstring wide_from_utf8(const std::string &input)
Iterator(const std::string::const_iterator &iter)
Definition: convert.h:511
Iterator::value_type operator*() const
Definition: convert.h:482
ReverseIterator & operator=(const ReverseIterator &iter)
Definition: convert.h:816
std::string uniwide_to_utf8(const std::wstring &input)
ReverseIterator::value_type operator*() const
Definition: convert.h:965
#define CGU_GLIB_MEMORY_SLICES_FUNCS
Definition: cgu_config.h:84
std::bidirectional_iterator_tag iterator_category
Definition: convert.h:718
ReverseIterator()
Definition: convert.h:922
gunichar value_type
Definition: convert.h:714
Iterator & operator++()
Definition: convert.h:566
ReverseIterator(const Iterator &iter)
Definition: convert.h:915
bool operator>(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:647
std::string::const_iterator base() const
Definition: convert.h:494
std::string filename_to_utf8(const std::string &input)
bool operator<=(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:636
gunichar value_type
Definition: convert.h:366
ConversionError(GError *error)
Definition: convert.h:101
std::string filename_from_utf8(const std::string &input)
bool operator!=(const Iterator &iter1, const Iterator &iter2)
Definition: convert.h:614
std::wstring uniwide_from_utf8(const std::string &input)
A class which will iterate through a std::string object by reference to unicode characters rather tha...
Definition: convert.h:364
virtual const char * what() const
Definition: convert.h:91
std::bidirectional_iterator_tag iterator_category
Definition: convert.h:370
Iterator & operator=(const std::string::iterator &iter)
Definition: convert.h:446
ReverseIterator & operator++()
Definition: convert.h:929
Iterator(const std::string::iterator &iter)
Definition: convert.h:528
void pointer
Definition: convert.h:716
Iterator & operator--()
Definition: convert.h:581