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 }
karto::DatasetPrivate::m_Objects
ObjectList m_Objects
Definition: Dataset.cpp:30
TypeCasts.h
karto::Dataset::GetObjects
const ObjectList & GetObjects() const
Definition: Dataset.cpp:73
Dataset.h
karto::Dataset::Clear
void Clear()
Definition: Dataset.cpp:67
karto::List< ObjectPtr >
karto::DatasetPrivate::m_pDatasetInfo
SmartPointer< DatasetInfo > m_pDatasetInfo
Definition: Dataset.cpp:31
karto::List::Clear
virtual void Clear()
Definition: List.h:231
karto::Dataset::Dataset
Dataset()
Definition: Dataset.cpp:34
karto::Dataset::operator[]
Object * operator[](kt_int32u index) const
Definition: Dataset.cpp:78
karto::List::Add
virtual void Add(const T &rValue)
Definition: List.h:111
karto::Dataset::m_pDatasetPrivate
DatasetPrivate * m_pDatasetPrivate
Definition: Dataset.h:96
kt_int32u
uint32_t kt_int32u
Definition: Types.h:111
karto::Dataset::Add
void Add(Object *pObject)
Definition: Dataset.cpp:47
karto::SmartPointer< DatasetInfo >
karto::DatasetPrivate
Definition: Dataset.cpp:28
karto::Object
Definition: Object.h:54
karto::Dataset::GetDatasetInfo
DatasetInfo * GetDatasetInfo()
Definition: Dataset.cpp:62
karto
Definition: Any.cpp:20


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Wed Mar 2 2022 00:37:22