All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataSetName.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 terralib/dataaccess/query/DataSetName.cpp
22 
23  \brief A class that models the name of a dataset used in a From clause.
24 */
25 
26 // TerraLib
27 #include "DataSetName.h"
28 
29 te::da::DataSetName::DataSetName(const std::string& name, const std::string& alias)
30  : FromItem(alias),
31  m_name(name)
32 {
33 }
34 
36  : FromItem(rhs),
37  m_name(rhs.m_name)
38 {
39 }
40 
42 {
43  if(this != &rhs)
44  {
46  m_name = rhs.m_name;
47  }
48 
49  return *this;
50 }
51 
53 {
54  return new DataSetName(*this);
55 }
56 
57 const std::string& te::da::DataSetName::getName() const
58 {
59  return m_name;
60 }
61 
62 void te::da::DataSetName::setName(const std::string& name)
63 {
64  m_name = name;
65 }
66 
DataSetName & operator=(const DataSetName &rhs)
Definition: DataSetName.cpp:41
An abstract class that models a source of data in a query.
Definition: FromItem.h:50
A class that models the name of a dataset used in a From clause.
Definition: DataSetName.h:43
FromItem * clone() const
It creates a new copy of this FromItem.
Definition: DataSetName.cpp:52
A class that models the name of a dataset used in a From clause.
FromItem & operator=(const FromItem &rhs)
Definition: FromItem.cpp:34
TE_DEFINE_VISITABLE DataSetName(const std::string &name, const std::string &alias="")
Constructor.
Definition: DataSetName.cpp:29
const std::string & getName() const
It returns the dataset name.
Definition: DataSetName.cpp:57
std::string m_name
The dataset name.
Definition: DataSetName.h:85
void setName(const std::string &name)
It sets the dataset name.
Definition: DataSetName.cpp:62