diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-09-27 18:09:07 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-09-27 18:09:07 +0300 |
commit | 2eae362fd3f50325067fa3d7e13db6882df80e76 (patch) | |
tree | a6eff5f8f12b990e3d256d4b02fdb86d70d81eac /src/texo.hpp | |
download | texo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar texo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar.xz texo-2eae362fd3f50325067fa3d7e13db6882df80e76.zip |
Texo initial.
Diffstat (limited to 'src/texo.hpp')
-rw-r--r-- | src/texo.hpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/texo.hpp b/src/texo.hpp new file mode 100644 index 0000000..2129f61 --- /dev/null +++ b/src/texo.hpp @@ -0,0 +1,62 @@ +#ifndef TEXO_INCLUDED_TEXO +#define TEXO_INCLUDED_TEXO + +#include <stdio.h> + + +class Texo { +public: + enum Type { + character = 0, + link_begin, + link_end, + image, + bold_begin, + bold_end, + italic_begin, + italic_end, + strike_begin, + strike_end, + underline_begin, + underline_end, + paragraph_begin, + paragraph_end, + newline + } type; + Texo(Type type); + Texo(const char c); + const char c; + const char *link_url; + const char *image_src; + const char *image_alt; +}; + + +class TexoExporter { +public: + virtual void Put(const char c) = 0; + virtual void PutStr(const char *str); +}; + + +class TexoProducer { +public: + TexoProducer(TexoExporter &exporter); + virtual void Put(const Texo &piece) = 0; +protected: + TexoExporter &exporter; +}; + + +class TexoImporter { +public: + TexoImporter(TexoProducer &producer); + virtual void Put(const char c) = 0; + virtual void PutStr(const char *str); + virtual void PutFile(FILE *file); +protected: + TexoProducer &producer; +}; + + +#endif |