TypeCasts.h
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 #pragma once
19 
20 #ifndef __OpenKarto_TypeCasts_h__
21 #define __OpenKarto_TypeCasts_h__
22 
23 #include <OpenKarto/Sensor.h>
24 #include <OpenKarto/SensorData.h>
25 #include <OpenKarto/Objects.h>
27 
28 namespace karto
29 {
31 
32 
36 
37  KARTO_TYPECHECKCAST(Sensor)
38  KARTO_TYPECHECKCAST(SensorData)
39  KARTO_TYPECHECKCAST(LaserRangeFinder)
40  KARTO_TYPECHECKCAST(Drive)
41  KARTO_TYPECHECKCAST(DrivePose)
42  KARTO_TYPECHECKCAST(LocalizedRangeScan)
43  KARTO_TYPECHECKCAST(LocalizedPointScan)
44  KARTO_TYPECHECKCAST(ModuleParameters)
45  KARTO_TYPECHECKCAST(DatasetInfo)
46  KARTO_TYPECHECKCAST(OccupancyGrid)
47 
48 
54  {
55  return IsLocalizedRangeScan(pObject) || IsLocalizedPointScan(pObject);
56  }
57 
58 #ifdef WIN32
59 #define EXPORT_KARTO_LIST(declspec, T) \
60  template class declspec karto::List<T>;
61 
62  EXPORT_KARTO_LIST(KARTO_EXPORT, kt_double)
63  EXPORT_KARTO_LIST(KARTO_EXPORT, Pose2)
64  EXPORT_KARTO_LIST(KARTO_EXPORT, Vector2d)
66  EXPORT_KARTO_LIST(KARTO_EXPORT, SmartPointer<CustomItem>)
67  EXPORT_KARTO_LIST(KARTO_EXPORT, SmartPointer<Sensor>)
69  EXPORT_KARTO_LIST(KARTO_EXPORT, SmartPointer<Object>)
70 #endif
71 
73 }
74 
75 #endif // __OpenKarto_TypeCasts_h__
bool kt_bool
Definition: Types.h:145
kt_bool IsLocalizedLaserScan(Object *pObject)
Definition: TypeCasts.h:53
#define KARTO_EXPORT
Definition: Macros.h:78
#define KARTO_TYPECHECKCAST(__Name__)
Definition: Object.h:41
double kt_double
Definition: Types.h:160
Definition: Any.cpp:20


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36