All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ObjectId.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 ObjectId.cpp
22 
23  \brief An object identifier is meant to represent a unique identifier for an object instance within the context of the web service or database that is serving the object.
24  */
25 
26 // TerraLib
27 #include "ObjectId.h"
28 
29 // STL
30 #include <cassert>
31 
32 te::fe::ObjectId::ObjectId(const char* id, OidType oidType)
33  : m_id(id),
34  m_oidType(oidType)
35 {
36  assert(m_id.empty() == false);
37 }
38 
40 {
41 }
42 
43 void te::fe::ObjectId::setId(const std::string& id)
44 {
45  assert(id.empty() == false);
46  m_id = id;
47 }
48 
49 const std::string& te::fe::ObjectId::getId() const
50 {
51  return m_id;
52 }
53 
55 {
56  m_oidType = t;
57 }
58 
60 {
61  return m_oidType;
62 }
const std::string & getId() const
It returns the feature identification value.
Definition: ObjectId.cpp:49
~ObjectId()
Destructor.
Definition: ObjectId.cpp:39
ObjectId(const char *id, OidType oidType)
It initializes a new ObjectId.
Definition: ObjectId.cpp:32
OidType
The type of object identification used.
Definition: ObjectId.h:67
OidType getOidType() const
It returns the format type used by the feature identification value.
Definition: ObjectId.cpp:59
std::string m_id
The id in a string format.
Definition: ObjectId.h:128
void setOidType(OidType t)
It sets the format type used by the feature identification value.
Definition: ObjectId.cpp:54
void setId(const std::string &id)
It sets the feature identification value.
Definition: ObjectId.cpp:43