All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EnumLineStyleType.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file EnumLineStyleType.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "EnumLineStyleType.h"
30 
32  m_styleNone(0),
33  m_styleSolid(0),
34  m_styleDash(0),
35  m_styleDot(0),
36  m_styleDashDot(0),
37  m_styleDashDotDot(0),
38  m_styleCustomDash(0)
39 {
40  init();
41 }
42 
44 {
45  if(m_styleNone)
46  {
47  delete m_styleNone;
48  m_styleNone = 0;
49  }
50  if(m_styleSolid)
51  {
52  delete m_styleSolid;
53  m_styleSolid = 0;
54  }
55  if(m_styleDash)
56  {
57  delete m_styleDash;
58  m_styleDash = 0;
59  }
60  if(m_styleDot)
61  {
62  delete m_styleDot;
63  m_styleDot = 0;
64  }
65  if(m_styleDashDot)
66  {
67  delete m_styleDashDot;
68  m_styleDashDot = 0;
69  }
70  if(m_styleDashDotDot)
71  {
72  delete m_styleDashDotDot;
73  m_styleDashDotDot = 0;
74  }
75  if(m_styleCustomDash)
76  {
77  delete m_styleCustomDash;
78  m_styleCustomDash = 0;
79  }
80 }
81 
83 {
84  m_styleNone = new EnumType(0, "No Line", this);
85  m_enums.push_back(m_styleNone);
86 
87  m_styleSolid = new EnumType(0, "Solid Line", this);
88  m_enums.push_back(m_styleSolid);
89 
90  m_styleDash = new EnumType(0, "Dash Line", this);
91  m_enums.push_back(m_styleDash);
92 
93  m_styleDot = new EnumType(0, "Dot Line", this);
94  m_enums.push_back(m_styleDot);
95 
96  m_styleDashDot = new EnumType(0, "Dash Dot Line", this);
97  m_enums.push_back(m_styleDashDot);
98 
99  m_styleDashDotDot = new EnumType(0, "Dash Dot Dot Line", this);
100  m_enums.push_back(m_styleDashDotDot);
101 
102  m_styleCustomDash = new EnumType(0, "Custom Dash Line", this);
103  m_enums.push_back(m_styleCustomDash);
104 }
105 
107 {
108  return m_styleNone;
109 }
110 
112 {
113  return m_styleSolid;
114 }
115 
117 {
118  return m_styleDash;
119 }
120 
122 {
123  return m_styleDot;
124 }
125 
127 {
128  return m_styleDashDot;
129 }
130 
132 {
133  return m_styleDashDot;
134 }
135 
137 {
138  return m_styleCustomDash;
139 }
virtual EnumType * getStyleDashDotDot() const
Returns value that represents dash dot dot style type belonging to enumeration.
virtual EnumType * getStyleDash() const
Returns value that represents dash style type belonging to enumeration.
virtual EnumType * getStyleDot() const
Returns value that represents dot style type belonging to enumeration.
virtual EnumType * getStyleSolid() const
Returns value that represents solid style type belonging to enumeration.
virtual EnumType * getStyleCustomDash() const
Returns value that represents custom dash style type belonging to enumeration.
virtual EnumType * getStyleNone() const
Returns value that represents none style type belonging to enumeration.
Class to represent a line style type enumeration. Ex.: solid, dash, dot, etc.
virtual ~EnumLineStyleType()
Destructor.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
virtual EnumType * getStyleDashDot() const
Returns value that represents dash dot style type belonging to enumeration.
virtual void init()
Reimplemented from AbstractEnum.