diff options
Diffstat (limited to 'src/libjin/Graphics/Font/Text.h')
-rw-r--r-- | src/libjin/Graphics/Font/Text.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/libjin/Graphics/Font/Text.h b/src/libjin/Graphics/Font/Text.h index 9fe152d..a4cbcbf 100644 --- a/src/libjin/Graphics/Font/Text.h +++ b/src/libjin/Graphics/Font/Text.h @@ -5,70 +5,70 @@ namespace jin { -namespace graphics -{ - - typedef unsigned int Codepoint; - - typedef std::vector<Codepoint> Content; + namespace graphics + { - class Text; - class Decoder; + typedef unsigned int Codepoint; - enum Encode - { - UTF8, // utf-8 - //UTF16, // utf-16 - ASCII, // ASCII - }; + typedef std::vector<Codepoint> Content; - /* raw encoded text */ - class Text - { - public: - Text(Encode encode, const void* data); - Text(Encode encode, const void* data, unsigned int length); - ~Text(); + class Text; + class Decoder; - const Content& getContent() const; - const Content& operator*() const; + enum Encode + { + UTF8, // utf-8 + //UTF16, // utf-16 + ASCII, // ASCII + }; - private: - class Iterator + /* raw encoded text */ + class Text { public: - Iterator(const Iterator& itor); - Iterator(const Encode& encode, const void* data, unsigned int length); - ~Iterator(); - - Codepoint get(); - //Iterator begin(); - //Iterator end(); - void toBegin(); - void toEnd(); - Codepoint operator *(); - /* prefix ++ */ - Iterator& operator ++(); - /* postfix ++ */ - Iterator operator ++(int); - bool operator !=(const Iterator& itor); - bool operator ==(const Iterator& itor); + Text(Encode encode, const void* data); + Text(Encode encode, const void* data, unsigned int length); + ~Text(); + + const Content& getContent() const; + const Content& operator*() const; private: - void operator = (const Iterator&); + class Iterator + { + public: + Iterator(const Iterator& itor); + Iterator(const Encode& encode, const void* data, unsigned int length); + ~Iterator(); + + Codepoint get(); + //Iterator begin(); + //Iterator end(); + void toBegin(); + void toEnd(); + Codepoint operator *(); + /* prefix ++ */ + Iterator& operator ++(); + /* postfix ++ */ + Iterator operator ++(int); + bool operator !=(const Iterator& itor); + bool operator ==(const Iterator& itor); + + private: + void operator = (const Iterator&); + + const Encode encode; + const Decoder* decoder; + const void* p; + const void* const data; + unsigned int length; + }; + + Content content; - const Encode encode; - const Decoder* decoder; - const void* p; - const void* const data; - unsigned int length; }; - Content content; - - }; - -} // graphics + } // graphics } // jin #endif
\ No newline at end of file |