MSPUBMetaData.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libmspub project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef INCLUDED_MSPUBMETADATA_H
11 #define INCLUDED_MSPUBMETADATA_H
12
13 #include <map>
14 #include <utility>
15 #include <vector>
16
17 #include <librevenge/librevenge.h>
18
19 #include <librevenge-stream/librevenge-stream.h>
20
21 namespace libmspub
22 {
23
24 class MSPUBMetaData
25 {
26 public:
27 MSPUBMetaData();
28 ~MSPUBMetaData();
29 bool parse(librevenge::RVNGInputStream *input);
30 bool parseTimes(librevenge::RVNGInputStream *input);
31 const librevenge::RVNGPropertyList &getMetaData();
32
33 private:
34 MSPUBMetaData(const MSPUBMetaData &);
35 MSPUBMetaData &operator=(const MSPUBMetaData &);
36
37 void readPropertySetStream(librevenge::RVNGInputStream *input);
38 void readPropertySet(librevenge::RVNGInputStream *input, uint32_t offset, char *FMTID);
39 void readPropertyIdentifierAndOffset(librevenge::RVNGInputStream *input);
40 void readTypedPropertyValue(librevenge::RVNGInputStream *input, uint32_t index, uint32_t offset, char *FMTID);
41 librevenge::RVNGString readCodePageString(librevenge::RVNGInputStream *input);
42
43 uint32_t getCodePage();
44
45 std::vector< std::pair<uint32_t, uint32_t> > m_idsAndOffsets;
46 std::map<uint16_t, uint16_t> m_typedPropertyValues;
47 librevenge::RVNGPropertyList m_metaData;
48 };
49
50 } // namespace libmspub
51
52 #endif // INCLUDED_MSPUBMETADATA_H
53
54 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libmspub::MSPUBMetaData
Definition: MSPUBMetaData.h:24
libmspub::MSPUBMetaData::MSPUBMetaData
MSPUBMetaData()
Definition: MSPUBMetaData.cpp:20
libmspub::MSPUBMetaData::m_metaData
librevenge::RVNGPropertyList m_metaData
Definition: MSPUBMetaData.h:47
libmspub::MSPUBMetaData::parse
bool parse(librevenge::RVNGInputStream *input)
Definition: MSPUBMetaData.cpp:83
libmspub::MSPUBMetaData::readPropertyIdentifierAndOffset
void readPropertyIdentifierAndOffset(librevenge::RVNGInputStream *input)
Definition: MSPUBMetaData.cpp:156
libmspub::MSPUBMetaData::m_typedPropertyValues
std::map< uint16_t, uint16_t > m_typedPropertyValues
Definition: MSPUBMetaData.h:46
libmspub::MSPUBMetaData::readPropertySet
void readPropertySet(librevenge::RVNGInputStream *input, uint32_t offset, char *FMTID)
Definition: MSPUBMetaData.cpp:124
libmspub::MSPUBMetaData::getCodePage
uint32_t getCodePage()
Definition: MSPUBMetaData.cpp:141
libmspub::MSPUBMetaData::readPropertySetStream
void readPropertySetStream(librevenge::RVNGInputStream *input)
Definition: MSPUBMetaData.cpp:93
libmspub::MSPUBMetaData::readTypedPropertyValue
void readTypedPropertyValue(librevenge::RVNGInputStream *input, uint32_t index, uint32_t offset, char *FMTID)
Definition: MSPUBMetaData.cpp:166
libmspub::MSPUBMetaData::readCodePageString
librevenge::RVNGString readCodePageString(librevenge::RVNGInputStream *input)
Definition: MSPUBMetaData.cpp:239
libmspub::MSPUBMetaData::~MSPUBMetaData
~MSPUBMetaData()
Definition: MSPUBMetaData.cpp:25
libmspub
Definition: Arrow.h:13
libmspub::MSPUBMetaData::operator=
MSPUBMetaData & operator=(const MSPUBMetaData &)
libmspub::MSPUBMetaData::m_idsAndOffsets
std::vector< std::pair< uint32_t, uint32_t > > m_idsAndOffsets
Definition: MSPUBMetaData.h:45
libmspub::MSPUBMetaData::parseTimes
bool parseTimes(librevenge::RVNGInputStream *input)
Definition: MSPUBMetaData.cpp:276
libmspub::MSPUBMetaData::getMetaData
const librevenge::RVNGPropertyList & getMetaData()
Definition: MSPUBMetaData.cpp:328