Line.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libmspub project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef __LINE_H__
00011 #define __LINE_H__
00012 #include "Dash.h"
00013 #include <boost/optional.hpp>
00014 #include "ColorReference.h"
00015 
00016 namespace libmspub
00017 {
00018 struct Line
00019 {
00020   ColorReference m_color;
00021   unsigned m_widthInEmu;
00022   bool m_lineExists;
00023   boost::optional<Dash> m_dash;
00024   Line(ColorReference color, unsigned widthInEmu, bool lineExists) :
00025     m_color(color), m_widthInEmu(widthInEmu), m_lineExists(lineExists),
00026     m_dash() { }
00027   Line(ColorReference color, unsigned widthInEmu, bool lineExists, Dash dash) :
00028     m_color(color), m_widthInEmu(widthInEmu), m_lineExists(lineExists),
00029     m_dash(dash) { }
00030   bool operator==(const Line &r) const
00031   {
00032     return m_color == r.m_color && m_widthInEmu == r.m_widthInEmu &&
00033            m_lineExists == r.m_lineExists && m_dash == r.m_dash;
00034   }
00035 };
00036 }
00037 
00038 #endif
00039 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */