aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/text.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2019-11-12 06:02:12 -0800
committerMike Buland <eichlan@xagasoft.com>2019-11-12 06:02:12 -0800
commitfd830279725081d95e3f08f768ed6879c92fe838 (patch)
tree3da9be0025e703d7a0afcb48458034b203efd8f3 /src/unstable/text.h
parent96759377ae8a4394d325747f597fe5b60afabf6e (diff)
downloadlibbu++-fd830279725081d95e3f08f768ed6879c92fe838.tar.gz
libbu++-fd830279725081d95e3f08f768ed6879c92fe838.tar.bz2
libbu++-fd830279725081d95e3f08f768ed6879c92fe838.tar.xz
libbu++-fd830279725081d95e3f08f768ed6879c92fe838.zip
32bit
Diffstat (limited to 'src/unstable/text.h')
-rw-r--r--src/unstable/text.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/unstable/text.h b/src/unstable/text.h
index 1d623ff..1154a50 100644
--- a/src/unstable/text.h
+++ b/src/unstable/text.h
@@ -27,11 +27,6 @@ namespace Bu
27 * multilpe code points. In addition, a code point can also represent 27 * multilpe code points. In addition, a code point can also represent
28 * formatting or display inforamtion. 28 * formatting or display inforamtion.
29 * 29 *
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 */ 30 */
36 class Text 31 class Text
37 { 32 {
@@ -43,20 +38,22 @@ namespace Bu
43 public: 38 public:
44 Text(); 39 Text();
45 Text( const Text &rSrc ); 40 Text( const Text &rSrc );
41 Text( const TextBuilder &rSrc );
46 virtual ~Text(); 42 virtual ~Text();
47 43
48 bool isEmpty() const; 44 bool isEmpty() const;
49 bool isBmpOnly() const; 45 bool isBmpOnly() const;
50 int32_t getSize() const; 46 int32_t getSize() const;
51 int32_t getSizeInBytes() const; 47 int32_t getSizeInBytes() const;
48 CodePoint operator[]( int32_t iIndex ) const;
52 49
53 uint16_t *getRawData() const; 50 CodePoint *getData() const;
54// Text transform( (CodePoint *)(*pCallback)( CodePoint * ) ); 51// Text transform( (CodePoint *)(*pCallback)( CodePoint * ) );
55 52
56 private: 53 private:
57 uint16_t *pData; 54 CodePoint *pData;
55 bool bIsBmpOnly;
58 int32_t iSize; 56 int32_t iSize;
59 int32_t iCodePoints;
60 }; 57 };
61 typedef Text::CodePoint CodePoint; 58 typedef Text::CodePoint CodePoint;
62} 59}