FB2MetadataCollector.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 FB2METADATACOLLECTOR_H_INCLUDED
00011 #define FB2METADATACOLLECTOR_H_INCLUDED
00012 
00013 #include "FB2Collector.h"
00014 
00015 
00016 namespace libebook
00017 {
00018 
00019 class FB2MetadataCollector : public FB2Collector
00020 {
00021 public:
00022   FB2MetadataCollector(librevenge::RVNGPropertyList &metadata);
00023 
00024 private:
00025   virtual void defineMetadataEntry(const char *name, const char *value);
00026   virtual void openMetadataEntry(const char *name);
00027   virtual void closeMetadataEntry();
00028 
00029   virtual void defineID(const char *id);
00030 
00031   virtual void openPageSpan();
00032   virtual void closePageSpan();
00033 
00034   virtual void openBlock();
00035   virtual void closeBlock();
00036 
00037   virtual void openParagraph(const FB2BlockFormat &format);
00038   virtual void closeParagraph();
00039 
00040   virtual void openSpan(const FB2Style &style);
00041   virtual void closeSpan();
00042 
00043   virtual void insertText(const char *text);
00044 
00045   virtual void openTable(const FB2BlockFormat &format);
00046   virtual void closeTable();
00047 
00048   virtual void openTableRow(const FB2BlockFormat &format);
00049   virtual void closeTableRow();
00050 
00051   virtual void openTableCell(int rowspan, int colspan);
00052   virtual void closeTableCell();
00053   virtual void insertCoveredTableCell();
00054 
00055   virtual void insertFootnote(const char *id);
00056 
00057   virtual void insertBitmap(const char *id);
00058   virtual void insertBitmapData(const char *contentType, const char *base64Data);
00059 
00060 private:
00061   librevenge::RVNGPropertyList &m_metadata;
00062 };
00063 
00064 }
00065 
00066 #endif // FB2METADATACOLLECTOR_H_INCLUDED
00067 
00068 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */