FB2Collector.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libe-book project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef FB2COLLECTOR_H_INCLUDED
00011 #define FB2COLLECTOR_H_INCLUDED
00012 
00013 namespace libebook
00014 {
00015 
00016 struct FB2BlockFormat;
00017 class FB2Style;
00018 
00019 class FB2Collector
00020 {
00021 public:
00022   virtual ~FB2Collector() = 0;
00023 
00024   virtual void defineMetadataEntry(const char *name, const char *value) = 0;
00025   virtual void openMetadataEntry(const char *name) = 0;
00026   virtual void closeMetadataEntry() = 0;
00027 
00028   virtual void defineID(const char *id) = 0;
00029 
00030   virtual void openPageSpan() = 0;
00031   virtual void closePageSpan() = 0;
00032 
00033   virtual void openBlock() = 0;
00034   virtual void closeBlock() = 0;
00035 
00036   virtual void openParagraph(const FB2BlockFormat &format) = 0;
00037   virtual void closeParagraph() = 0;
00038 
00039   virtual void openSpan(const FB2Style &style) = 0;
00040   virtual void closeSpan() = 0;
00041 
00042   virtual void insertText(const char *text) = 0;
00043 
00044   virtual void openTable(const FB2BlockFormat &format) = 0;
00045   virtual void closeTable() = 0;
00046 
00047   virtual void openTableRow(const FB2BlockFormat &format) = 0;
00048   virtual void closeTableRow() = 0;
00049 
00050   virtual void openTableCell(int rowspan, int colspan) = 0;
00051   virtual void closeTableCell() = 0;
00052   virtual void insertCoveredTableCell() = 0;
00053 
00054   virtual void insertFootnote(const char *id) = 0;
00055 
00056   virtual void insertBitmap(const char *id) = 0;
00057   virtual void insertBitmapData(const char *contentType, const char *base64Data) = 0;
00058 };
00059 
00060 }
00061 
00062 #endif // FB2COLLECTOR_H_INCLUDED
00063 
00064 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */