All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EnumGridStyleType.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 EnumGridStyleType.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "EnumGridStyleType.h"
30 
32  m_styleNone(0),
33  m_styleContinuous(0),
34  m_styleCross(0)
35 {
36  init();
37 }
38 
40 {
41  if(m_styleNone)
42  {
43  delete m_styleNone;
44  m_styleNone = 0;
45  }
46  if(m_styleContinuous)
47  {
48  delete m_styleContinuous;
49  m_styleContinuous = 0;
50  }
51  if(m_styleCross)
52  {
53  delete m_styleCross;
54  m_styleCross = 0;
55  }
56 }
57 
59 {
60  m_styleNone = new EnumType(0, "None", this);
61  m_enums.push_back(m_styleNone);
62 
63  m_styleContinuous = new EnumType(1, "Continuous", this);
64  m_enums.push_back(m_styleContinuous);
65 
66  m_styleCross = new EnumType(2, "Cross", this);
67  m_enums.push_back(m_styleCross);
68 }
69 
71 {
72  return m_styleNone;
73 }
74 
76 {
77  return m_styleContinuous;
78 }
79 
81 {
82  return m_styleCross;
83 }
virtual ~EnumGridStyleType()
Destructor.
virtual void init()
Reimplemented from AbstractEnum.
virtual EnumType * getStyleCross() const
Returns value that represents cross style type belonging to enumeration.
Class to represent a grid style type enumeration. Ex.: continuous, cross, etc.
virtual EnumType * getStyleContinuous() const
Returns value that represents continuous style type belonging to enumeration.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
virtual EnumType * getStyleNone() const
Returns value that represents none style type belonging to enumeration.