dataaccess/dataset/CheckConstraint.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/dataset/CheckConstraint.cpp
22 
23  \brief A class that describes a check constraint.
24 */
25 
26 // TerraLib
27 #include "../../datatype/Property.h"
28 #include "CheckConstraint.h"
29 #include "DataSetType.h"
30 
32  : Constraint(id)
33 {
34  if(dt)
35  dt->add(this);
36 }
37 
39  DataSetType* dt,
40  unsigned int id)
41  : Constraint(name, id)
42 {
43  if(dt)
44  dt->add(this);
45 }
46 
48 
49  = default;
50 
52 {
53  if(this != &rhs)
54  {
56 
58  }
59 
60  return *this;
61 }
62 
64 {
65  return new CheckConstraint(*this);
66 }
CheckConstraint(DataSetType *dt=0, unsigned int id=0)
Constructor.
A class that models the description of a dataset.
Definition: DataSetType.h:72
Constraint & operator=(const Constraint &rhs)
Assignment operator not allowed.
A class that describes a check constraint.
std::string m_expression
The check constraint expression.
static te::dt::TimeDuration dt(20, 30, 50, 11)
Constraint * clone()
It returns a clone of the object.
A class that describes a check constraint.
void add(Constraint *c)
It adds a new constraint.
A class that models the description of a dataset.
CheckConstraint & operator=(const CheckConstraint &rhs)
Assignment operator.