VSDLayerList.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 __VSDLAYERLIST_H__
11 #define __VSDLAYERLIST_H__
12 
13 #include <map>
14 #include <vector>
15 #include <boost/optional.hpp>
16 #include "VSDTypes.h"
17 
18 namespace libvisio
19 {
20 
21 struct VSDLayer
22 {
23  VSDLayer();
24  VSDLayer(const VSDLayer &layer);
25  ~VSDLayer();
26  VSDLayer &operator=(const VSDLayer &layer);
27 
28  boost::optional<Colour> m_colour;
29  bool m_visible;
31 };
32 
34 {
35 public:
36  VSDLayerList();
37  VSDLayerList(const VSDLayerList &layerList);
38  ~VSDLayerList();
39  VSDLayerList &operator=(const VSDLayerList &layerList);
40 
41  void clear();
42 
43  void addLayer(unsigned id, const VSDLayer &layer);
44 
45  const Colour *getColour(const std::vector<unsigned> &ids);
46  bool getVisible(const std::vector<unsigned> &ids);
47  bool getPrintable(const std::vector<unsigned> &ids);
48 
49 private:
50  std::map<unsigned, VSDLayer> m_elements;
51 };
52 
53 
54 
55 
56 } // namespace libvisio
57 
58 #endif // __VSDLAYERLIST_H__
59 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: VSDLayerList.h:33
bool getPrintable(const std::vector< unsigned > &ids)
Definition: VSDLayerList.cpp:105
Definition: VSDTypes.h:70
VSDLayer()
Definition: VSDLayerList.cpp:12
void clear()
Definition: VSDLayerList.cpp:58
bool m_visible
Definition: VSDLayerList.h:29
VSDLayer & operator=(const VSDLayer &layer)
Definition: VSDLayerList.cpp:19
Definition: VSDLayerList.h:21
~VSDLayerList()
Definition: VSDLayerList.cpp:53
boost::optional< Colour > m_colour
Definition: VSDLayerList.h:28
~VSDLayer()
Definition: VSDLayerList.cpp:17
const Colour * getColour(const std::vector< unsigned > &ids)
Definition: VSDLayerList.cpp:68
void addLayer(unsigned id, const VSDLayer &layer)
Definition: VSDLayerList.cpp:63
std::map< unsigned, VSDLayer > m_elements
Definition: VSDLayerList.h:50
Definition: libvisio_utils.h:48
bool getVisible(const std::vector< unsigned > &ids)
Definition: VSDLayerList.cpp:89
bool m_printable
Definition: VSDLayerList.h:30
VSDLayerList()
Definition: VSDLayerList.cpp:30
VSDLayerList & operator=(const VSDLayerList &layerList)
Definition: VSDLayerList.cpp:42

Generated for libvisio by doxygen 1.8.8