aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/unstable/text.h')
-rw-r--r--src/unstable/text.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/unstable/text.h b/src/unstable/text.h
index 1d623ff..c57dcfb 100644
--- a/src/unstable/text.h
+++ b/src/unstable/text.h
@@ -12,6 +12,8 @@
12 12
13namespace Bu 13namespace Bu
14{ 14{
15 class TextBuilder;
16
15 /** 17 /**
16 * Represents a string of text. Human readable language. This should be 18 * Represents a string of text. Human readable language. This should be
17 * used any time you're dealing with actual text and not just binary 19 * used any time you're dealing with actual text and not just binary
@@ -27,11 +29,6 @@ namespace Bu
27 * multilpe code points. In addition, a code point can also represent 29 * multilpe code points. In addition, a code point can also represent
28 * formatting or display inforamtion. 30 * formatting or display inforamtion.
29 * 31 *
30 * Internally all data is stored in UTF-16, which is a fair compromise for
31 * mose text. All characters from all modern natural languages fit within
32 * the Basic Multilingual Plane, which requires only a single 16 bit value
33 * to represent it. However, when iterating through or addressing data
34 * in the Text object all work is done on a code point basis.
35 */ 32 */
36 class Text 33 class Text
37 { 34 {
@@ -43,20 +40,22 @@ namespace Bu
43 public: 40 public:
44 Text(); 41 Text();
45 Text( const Text &rSrc ); 42 Text( const Text &rSrc );
43 Text( const TextBuilder &rSrc );
46 virtual ~Text(); 44 virtual ~Text();
47 45
48 bool isEmpty() const; 46 bool isEmpty() const;
49 bool isBmpOnly() const; 47 bool isBmpOnly() const;
50 int32_t getSize() const; 48 int32_t getSize() const;
51 int32_t getSizeInBytes() const; 49 int32_t getSizeInBytes() const;
50 CodePoint operator[]( int32_t iIndex ) const;
52 51
53 uint16_t *getRawData() const; 52 CodePoint *getData() const;
54// Text transform( (CodePoint *)(*pCallback)( CodePoint * ) ); 53// Text transform( (CodePoint *)(*pCallback)( CodePoint * ) );
55 54
56 private: 55 private:
57 uint16_t *pData; 56 CodePoint *pData;
57 bool bIsBmpOnly;
58 int32_t iSize; 58 int32_t iSize;
59 int32_t iCodePoints;
60 }; 59 };
61 typedef Text::CodePoint CodePoint; 60 typedef Text::CodePoint CodePoint;
62} 61}