VSDMetaData.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 libvisio 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 __VSDMETADATA_H__
00011 #define __VSDMETADATA_H__
00012 
00013 #include <vector>
00014 #include <utility>
00015 #include <map>
00016 #include <librevenge-stream/librevenge-stream.h>
00017 #include <librevenge/librevenge.h>
00018 #include "libvisio_utils.h"
00019 
00020 namespace libvisio
00021 {
00022 
00023 class VSDMetaData
00024 {
00025 public:
00026   VSDMetaData();
00027   ~VSDMetaData();
00028   bool parse(librevenge::RVNGInputStream *input);
00029   bool parseTimes(librevenge::RVNGInputStream *input);
00030   const librevenge::RVNGPropertyList &getMetaData();
00031 
00032 private:
00033   VSDMetaData(const VSDMetaData &);
00034   VSDMetaData &operator=(const VSDMetaData &);
00035 
00036   void readPropertySetStream(librevenge::RVNGInputStream *input);
00037   void readPropertySet(librevenge::RVNGInputStream *input, uint32_t offset, char *FMTID);
00038   void readPropertyIdentifierAndOffset(librevenge::RVNGInputStream *input);
00039   void readTypedPropertyValue(librevenge::RVNGInputStream *input, uint32_t index, uint32_t offset, char *FMTID);
00040   librevenge::RVNGString readCodePageString(librevenge::RVNGInputStream *input);
00041 
00042   uint32_t getCodePage();
00043 
00044   std::vector< std::pair<uint32_t, uint32_t> > m_idsAndOffsets;
00045   std::map<uint16_t, uint16_t> m_typedPropertyValues;
00046   librevenge::RVNGPropertyList m_metaData;
00047 };
00048 
00049 } // namespace libvisio
00050 
00051 #endif // __VSDMETADATA_H__
00052 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */