Dataset.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011, SRI International (R)
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <OpenKarto/Dataset.h>
19 #include <OpenKarto/TypeCasts.h>
20 
21 namespace karto
22 {
23 
27 
29  {
32  };
33 
35  : m_pDatasetPrivate(new DatasetPrivate())
36  {
38  }
39 
40  Dataset::~Dataset()
41  {
42  Clear();
43 
44  delete m_pDatasetPrivate;
45  }
46 
47  void Dataset::Add(Object* pObject)
48  {
49  if (pObject != NULL)
50  {
51  if (IsDatasetInfo(pObject))
52  {
53  m_pDatasetPrivate->m_pDatasetInfo = dynamic_cast<DatasetInfo*>(pObject);
54  }
55  else
56  {
58  }
59  }
60  }
61 
62  DatasetInfo* Dataset::GetDatasetInfo()
63  {
65  }
66 
68  {
71  }
72 
74  {
76  }
77 
79  {
80  assert(index < m_pDatasetPrivate->m_Objects.Size());
81  return m_pDatasetPrivate->m_Objects[index];
82  }
83 
84 }
void Clear()
Definition: Dataset.cpp:67
const ObjectList & GetObjects() const
Definition: Dataset.cpp:73
virtual void Add(const T &rValue)
Definition: List.h:111
Object * operator[](kt_int32u index) const
Definition: Dataset.cpp:78
void Add(Object *pObject)
Definition: Dataset.cpp:47
uint32_t kt_int32u
Definition: Types.h:111
DatasetPrivate * m_pDatasetPrivate
Definition: Dataset.h:96
ObjectList m_Objects
Definition: Dataset.cpp:30
DatasetInfo * GetDatasetInfo()
Definition: Dataset.cpp:62
Definition: Any.cpp:20
virtual void Clear()
Definition: List.h:231
SmartPointer< DatasetInfo > m_pDatasetInfo
Definition: Dataset.cpp:31


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Thu Jun 6 2019 19:20:24