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 
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: */
const std::vector< unsigned > & getShapesOrder()
Definition: VSDShapeList.cpp:60
bool empty() const
Definition: VSDShapeList.h:30
std::map< unsigned, unsigned > m_elements
Definition: VSDShapeList.h:36
void addShapeId(unsigned id, unsigned shapeId)
Definition: VSDShapeList.cpp:44
~VSDShapeList()
Definition: VSDShapeList.cpp:39
VSDShapeList()
Definition: VSDShapeList.cpp:14
void setElementsOrder(const std::vector< unsigned > &elementsOrder)
Definition: VSDShapeList.cpp:55
void clear()
Definition: VSDShapeList.cpp:88
std::vector< unsigned > m_shapesOrder
Definition: VSDShapeList.h:38
Definition: VSDShapeList.h:19
VSDShapeList & operator=(const VSDShapeList &shapeList)
Definition: VSDShapeList.cpp:28
std::vector< unsigned > m_elementsOrder
Definition: VSDShapeList.h:37

Generated for libvisio by doxygen 1.8.6