Line.h Source File documentation

Line.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 libmspub 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 INCLUDED_LINE_H
11 #define INCLUDED_LINE_H
12
13 #include <boost/optional.hpp>
14
15 #include "ColorReference.h"
16 #include "Dash.h"
17
18 namespace libmspub
19 {
20 struct Line
21 {
22 ColorReference m_color;
23 unsigned m_widthInEmu;
24 bool m_lineExists;
25 boost::optional<Dash> m_dash;
26 Line(ColorReference color, unsigned widthInEmu, bool lineExists) :
27 m_color(color), m_widthInEmu(widthInEmu), m_lineExists(lineExists),
28 m_dash() { }
29 Line(ColorReference color, unsigned widthInEmu, bool lineExists, Dash dash) :
30 m_color(color), m_widthInEmu(widthInEmu), m_lineExists(lineExists),
31 m_dash(dash) { }
32 bool operator==(const Line &r) const
33 {
34 return m_color == r.m_color && m_widthInEmu == r.m_widthInEmu &&
35 m_lineExists == r.m_lineExists && m_dash == r.m_dash;
36 }
37 };
38 }
39
40 #endif
41 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libmspub::Line::m_dash
boost::optional< Dash > m_dash
Definition: Line.h:25
Dash.h
libmspub::Line::operator==
bool operator==(const Line &r) const
Definition: Line.h:32
libmspub
Definition: Arrow.h:13
libmspub::Line
Definition: Line.h:20
libmspub::Line::m_color
ColorReference m_color
Definition: Line.h:22
ColorReference.h
libmspub::Line::m_widthInEmu
unsigned m_widthInEmu
Definition: Line.h:23
libmspub::Line::Line
Line(ColorReference color, unsigned widthInEmu, bool lineExists)
Definition: Line.h:26
libmspub::Line::m_lineExists
bool m_lineExists
Definition: Line.h:24
libmspub::Line::Line
Line(ColorReference color, unsigned widthInEmu, bool lineExists, Dash dash)
Definition: Line.h:29
libmspub::Dash
Definition: Dash.h:49
libmspub::ColorReference
Definition: ColorReference.h:19