VSDLayerList.h Source File documentation

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
18namespace 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;
30 bool m_printable;
31};
32
33 class VSDLayerList
34{
35public:
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
49private:
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: */
VSDTypes.h
libvisio::VSDLayerList
Definition VSDLayerList.h:34
libvisio::VSDLayerList::getPrintable
bool getPrintable(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:105
libvisio::VSDLayerList::VSDLayerList
VSDLayerList()
Definition VSDLayerList.cpp:30
libvisio::VSDLayerList::addLayer
void addLayer(unsigned id, const VSDLayer &layer)
Definition VSDLayerList.cpp:63
libvisio::VSDLayerList::operator=
VSDLayerList & operator=(const VSDLayerList &layerList)
Definition VSDLayerList.cpp:42
libvisio::VSDLayerList::clear
void clear()
Definition VSDLayerList.cpp:58
libvisio::VSDLayerList::getColour
const Colour * getColour(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:68
libvisio::VSDLayerList::~VSDLayerList
~VSDLayerList()
Definition VSDLayerList.cpp:53
libvisio::VSDLayerList::m_elements
std::map< unsigned, VSDLayer > m_elements
Definition VSDLayerList.h:50
libvisio::VSDLayerList::getVisible
bool getVisible(const std::vector< unsigned > &ids)
Definition VSDLayerList.cpp:89
libvisio
Definition libvisio_utils.h:49
libvisio::Colour
Definition VSDTypes.h:71
libvisio::VSDLayer
Definition VSDLayerList.h:22
libvisio::VSDLayer::m_visible
bool m_visible
Definition VSDLayerList.h:29
libvisio::VSDLayer::m_printable
bool m_printable
Definition VSDLayerList.h:30
libvisio::VSDLayer::m_colour
boost::optional< Colour > m_colour
Definition VSDLayerList.h:28
libvisio::VSDLayer::VSDLayer
VSDLayer()
Definition VSDLayerList.cpp:12
libvisio::VSDLayer::~VSDLayer
~VSDLayer()
Definition VSDLayerList.cpp:17
libvisio::VSDLayer::operator=
VSDLayer & operator=(const VSDLayer &layer)
Definition VSDLayerList.cpp:19