EPUBManifest.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 libepubgen 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 INCLUDED_EPUBMANIFEST_H
00011 #define INCLUDED_EPUBMANIFEST_H
00012 
00013 #include <string>
00014 #include <unordered_map>
00015 #include <utility>
00016 
00017 namespace libepubgen
00018 {
00019 
00020 class EPUBPath;
00021 class EPUBXMLSink;
00022 
00023 class EPUBManifest
00024 {
00025   // disable copying
00026   EPUBManifest(const EPUBManifest &);
00027   EPUBManifest &operator=(const EPUBManifest &);
00028 
00029   // media-type, id, properties
00030   typedef std::tuple<std::string, std::string, std::string> ValueType_t;
00031   typedef std::unordered_map<std::string, ValueType_t> MapType_t;
00032 
00033 public:
00034   EPUBManifest();
00035 
00036   void insert(const EPUBPath &path, const std::string &mimetype, const std::string &id, const std::string &properties);
00037 
00038   void writeTo(EPUBXMLSink &sink);
00039 
00040 private:
00041   MapType_t m_map;
00042 };
00043 
00044 }
00045 
00046 #endif // INCLUDED_EPUBMANIFEST_H
00047 
00048 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */