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