PMDPage.h Source File documentation

PMDPage.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 libpagemaker 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 __PMDPAGE_H__
11 #define __PMDPAGE_H__
12
13 #include <memory>
14 #include <vector>
15
16 #include <librevenge/librevenge.h>
17
18 #include "geometry.h"
19
20 namespace libpagemaker
21 {
22
23 class PMDPage
24 {
25 std::vector<std::shared_ptr<PMDLineSet> > m_shapes;
26 public:
27 PMDPage() : m_shapes()
28 { }
29
30 void addShape(const std::shared_ptr<PMDLineSet> &shape)
31 {
32 m_shapes.push_back(shape);
33 }
34
35 unsigned numShapes() const
36 {
37 return m_shapes.size();
38 }
39
40 std::shared_ptr<const PMDLineSet> getShape(unsigned i) const
41 {
42 return m_shapes.at(i);
43 }
44 };
45
46 }
47
48 #endif /* __PMDPAGE_H__ */
49
50 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libpagemaker::PMDPage::m_shapes
std::vector< std::shared_ptr< PMDLineSet > > m_shapes
Definition: PMDPage.h:25
geometry.h
libpagemaker::PMDPage::PMDPage
PMDPage()
Definition: PMDPage.h:27
PMDParser.h
libpagemaker::PMDPage::numShapes
unsigned numShapes() const
Definition: PMDPage.h:35
libpagemaker_utils.h
PMDCollector.h
libpagemaker::PMDPage::getShape
std::shared_ptr< const PMDLineSet > getShape(unsigned i) const
Definition: PMDPage.h:40
libpagemaker
Definition: geometry.h:22
libpagemaker::PMDPage
Definition: PMDPage.h:23
PMD_DEBUG_MSG
#define PMD_DEBUG_MSG(M)
Definition: libpagemaker_utils.h:56
libpagemaker::PMDPage::addShape
void addShape(const std::shared_ptr< PMDLineSet > &shape)
Definition: PMDPage.h:30