aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Utf8.h
blob: d2d11fb77e647da5834ea2e642e8f524645e04dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __LIBJIN_UTF8_H
#define __LIBJIN_UTF8_H

namespace jin
{
namespace graphics
{

    typedef unsigned int Codepoint;

    class Utf8
    {
    public:
        class Iterator
        {
        public: 
            /* unicode codepoint */ 
            Codepoint get();

        private:
            friend class Utf8;
            Iterator(const Utf8&);

            const char* _p;
            const Utf8& _utf8;
        };

        /* rawıսij */
        Utf8(const char* raw, unsigned int length);
        Iterator getIterator();

    private:
        friend class Utf8::Iterator;
        ~Utf8();

        char* _raw;
        unsigned int _length;

    };

}
}

#endif