aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/textcodec.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2019-11-11 05:01:29 -0800
committerMike Buland <eichlan@xagasoft.com>2019-11-11 05:01:29 -0800
commit96759377ae8a4394d325747f597fe5b60afabf6e (patch)
treedd2daea517d126edb782924cf6003b5ae24cbe50 /src/unstable/textcodec.h
parentd5098782e5645d39b5e92f150e187e7194ef055a (diff)
downloadlibbu++-96759377ae8a4394d325747f597fe5b60afabf6e.tar.gz
libbu++-96759377ae8a4394d325747f597fe5b60afabf6e.tar.bz2
libbu++-96759377ae8a4394d325747f597fe5b60afabf6e.tar.xz
libbu++-96759377ae8a4394d325747f597fe5b60afabf6e.zip
Working on TextBuilder & Text.
Seriously thinking about changing Text to just use full codepoints. It would be much less work, more reliable and predictable, easier to use, but would use twice the memory.
Diffstat (limited to 'src/unstable/textcodec.h')
-rw-r--r--src/unstable/textcodec.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/unstable/textcodec.h b/src/unstable/textcodec.h
index e69de29..6ae392e 100644
--- a/src/unstable/textcodec.h
+++ b/src/unstable/textcodec.h
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2007-2019 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef TEXT_CODEC_H
9#define TEXT_CODEC_H
10
11#include "bu/text.h"
12#include "bu/blob.h"
13
14namespace Bu
15{
16 class Text;
17 class Blob;
18 class TextBuilder;
19 class BlobBuilder;
20
21 /**
22 * Represents a textual format and the routines to convert from that
23 * format to unicode code points and vica versa.
24 */
25 class TextCodec
26 {
27 public:
28 TextCodec();
29 virtual ~TextCodec();
30
31// virtual Blob encode( const Text &rSource );
32// virtual Text decode( const Blob &rSource, int32_t &rBytesUsed );
33
34 virtual void encode( BlobBuilder &rTarget, const Text &rSource )=0;
35 virtual int32_t decode( TextBuilder &rTarget, const Blob &rSource )=0;
36
37 private:
38 };
39};
40
41#endif