bc1480873fbb389c0ad386654f330ed462afd8d4
5 #include <typeregister.h>
10 class TextModel
: public ContainerModel
{
12 static const std::string TYPENAME
;
13 static const TypeProxy
<TextModel
> PROXY
;
16 TextModel(INTEGER id
);
17 static const std::string
&getType();
18 static const std::string
*getSuper();
19 virtual const std::string
&getTypeName() const;
20 virtual void internalize(Reader
&reader
);
26 TextPiece(size_t len
);
27 virtual void read(Reader
&reader
) = 0;
28 virtual std::string
toString() = 0;
31 class LongPiece
: public TextPiece
{
33 LongPiece(size_t len
);
34 virtual void read(Reader
&reader
);
35 virtual std::string
toString();
38 class ShortPiece
: public TextPiece
{
40 ShortPiece(size_t len
);
41 virtual void read(Reader
&reader
);
42 virtual std::string
toString();
45 class ViewPiece
: public TextPiece
{
48 ViewPiece(Store
*view
);
49 virtual void read(Reader
&reader
);
50 virtual std::string
toString();
53 class StdTextModel
: public TextModel
{
55 static const std::string TYPENAME
;
56 static const TypeProxy
<StdTextModel
> PROXY
;
57 std::vector
<TextPiece
*> d_pieces
;
60 StdTextModel(INTEGER id
);
61 static const std::string
&getType();
62 static const std::string
*getSuper();
63 virtual const std::string
&getTypeName() const;
64 virtual void internalize(Reader
&reader
);
66 virtual std::string
toString();
71 #endif // _TEXTMODEL_H_