VSDShapeList.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 libvisio 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 __VSDSHAPELIST_H__
11#define __VSDSHAPELIST_H__
12
13#include <vector>
14#include <map>
15
16 namespace libvisio
17{
18
19 class VSDShapeList
20{
21 public:
22 VSDShapeList();
23 ~VSDShapeList();
24 VSDShapeList(const VSDShapeList &shapeList);
25 VSDShapeList &operator=(const VSDShapeList &shapeList);
26 void addShapeId(unsigned id, unsigned shapeId);
27 void addShapeId(unsigned shapeId);
28 void setElementsOrder(const std::vector<unsigned> &elementsOrder);
29 void clear();
30 bool empty() const
31 {
32 return (m_elements.empty());
33 }
34 const std::vector<unsigned> &getShapesOrder();
35 private:
36 std::map<unsigned, unsigned> m_elements;
37 std::vector<unsigned> m_elementsOrder;
38 std::vector<unsigned> m_shapesOrder;
39};
40
41} // namespace libvisio
42
43#endif // __VSDSHAPELIST_H__
44/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDShapeList::empty
bool empty() const
Definition VSDShapeList.h:30
libvisio::VSDShapeList::getShapesOrder
const std::vector< unsigned > & getShapesOrder()
Definition VSDShapeList.cpp:60
libvisio::VSDShapeList::m_elements
std::map< unsigned, unsigned > m_elements
Definition VSDShapeList.h:36
libvisio::VSDShapeList::setElementsOrder
void setElementsOrder(const std::vector< unsigned > &elementsOrder)
Definition VSDShapeList.cpp:55
libvisio::VSDShapeList::m_elementsOrder
std::vector< unsigned > m_elementsOrder
Definition VSDShapeList.h:37
libvisio::VSDShapeList::VSDShapeList
VSDShapeList()
Definition VSDShapeList.cpp:14
libvisio::VSDShapeList::m_shapesOrder
std::vector< unsigned > m_shapesOrder
Definition VSDShapeList.h:38
libvisio::VSDShapeList::~VSDShapeList
~VSDShapeList()
Definition VSDShapeList.cpp:39
libvisio::VSDShapeList::operator=
VSDShapeList & operator=(const VSDShapeList &shapeList)
Definition VSDShapeList.cpp:28
libvisio::VSDShapeList::addShapeId
void addShapeId(unsigned id, unsigned shapeId)
Definition VSDShapeList.cpp:44
libvisio::VSDShapeList::clear
void clear()
Definition VSDShapeList.cpp:88
libvisio
Definition libvisio_utils.h:49