All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EnumTemplateType.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 EnumTemplateType.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "EnumTemplateType.h"
30 
32  m_noneType(0),
33  m_jsonType(0)
34 {
35  init();
36 }
37 
39 {
40  if(m_noneType)
41  {
42  delete m_noneType;
43  m_noneType = 0;
44  }
45  if(m_jsonType)
46  {
47  delete m_jsonType;
48  m_jsonType = 0;
49  }
50 }
51 
53 {
54  m_noneType = new EnumType(1, "NoneTemplate", this);
55  m_enums.push_back(m_noneType);
56 
57  m_jsonType = new EnumType(0, "JsonTemplate", this);
58  m_enums.push_back(m_jsonType);
59 }
60 
62 {
63  return m_noneType;
64 }
65 
67 {
68  return m_jsonType;
69 }
virtual EnumType * getJsonType() const
Returns value that represents json type belonging to enumeration.
virtual void init()
Reimplemented from AbstractEnum.
virtual ~EnumTemplateType()
Destructor.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
Class to represent a scale type enumeration. Ex.: hollow scale bar, etc.
virtual EnumType * getNoneType() const
Returns value that represents none type belonging to enumeration.