OpenKarto.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006-2011, SRI International (R)
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as published by
00006  * the Free Software Foundation, either version 3 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #include <OpenKarto/OpenKarto.h>
00019 
00020 namespace karto
00021 {
00022   
00023   void InitializeOpenKartoMetaClasses()
00024   {
00025     MetaClass::Register<AbstractParameter>("AbstractParameter");
00026 
00027     MetaClass::Register<Parameter<kt_bool> >("ParameterBool").Base<AbstractParameter>();
00028     MetaClass::Register<Parameter<kt_char> >("ParameterChar").Base<AbstractParameter>();
00029 
00030     MetaClass::Register<Parameter<kt_int8s> >("ParameterInt8s").Base<AbstractParameter>();
00031     MetaClass::Register<Parameter<kt_int8u> >("ParameterInt8u").Base<AbstractParameter>();
00032     MetaClass::Register<Parameter<kt_int16s> >("ParameterInt16s").Base<AbstractParameter>();
00033     MetaClass::Register<Parameter<kt_int16u> >("ParameterInt16u").Base<AbstractParameter>();
00034     MetaClass::Register<Parameter<kt_int32s> >("ParameterInt32s").Base<AbstractParameter>();
00035     MetaClass::Register<Parameter<kt_int32u> >("ParameterInt32u").Base<AbstractParameter>();
00036     MetaClass::Register<Parameter<kt_int64s> >("ParameterInt64s").Base<AbstractParameter>();
00037     MetaClass::Register<Parameter<kt_int64u> >("ParameterInt64u").Base<AbstractParameter>();
00038 
00039     MetaClass::Register<Parameter<kt_float> >("ParameterFloat").Base<AbstractParameter>();
00040     MetaClass::Register<Parameter<kt_double> >("ParameterDouble").Base<AbstractParameter>();
00041 
00042     MetaClass::Register<Parameter<karto::String> >("ParameterString").Base<AbstractParameter>();
00043 
00044     MetaClass::Register<Parameter<karto::Size2<kt_int32s> > >("ParameterSize2Int32s").Base<AbstractParameter>();
00045     MetaClass::Register<Parameter<karto::Size2<kt_int32u> > >("ParameterSize2Int32u").Base<AbstractParameter>();
00046     MetaClass::Register<Parameter<karto::Size2<kt_double> > >("ParameterSize2Double").Base<AbstractParameter>();
00047 
00048     MetaClass::Register<Parameter<karto::Vector2i> >("ParameterVector2i").Base<AbstractParameter>();
00049     MetaClass::Register<Parameter<karto::Vector3i> >("ParameterVector3i").Base<AbstractParameter>();
00050     MetaClass::Register<Parameter<karto::Vector4i> >("ParameterVector4i").Base<AbstractParameter>();
00051 
00052     MetaClass::Register<Parameter<karto::Vector2iu> >("ParameterVector2iu").Base<AbstractParameter>();
00053     MetaClass::Register<Parameter<karto::Vector3iu> >("ParameterVector3iu").Base<AbstractParameter>();
00054     MetaClass::Register<Parameter<karto::Vector4iu> >("ParameterVector4iu").Base<AbstractParameter>();
00055 
00056     MetaClass::Register<Parameter<karto::Vector2d> >("ParameterVector2d").Base<AbstractParameter>();
00057     MetaClass::Register<Parameter<karto::Vector3d> >("ParameterVector3d").Base<AbstractParameter>();
00058     MetaClass::Register<Parameter<karto::Vector4d> >("ParameterVector4d").Base<AbstractParameter>();
00059 
00060     MetaClass::Register<Parameter<karto::Quaternion> >("ParameterQuaternion").Base<AbstractParameter>();
00061 
00062     MetaClass::Register<Parameter<karto::Color> >("ParameterColor").Base<AbstractParameter>();
00063 
00064     MetaClass::Register<Parameter<karto::Pose2> >("ParameterPose2").Base<AbstractParameter>();
00065     MetaClass::Register<Parameter<karto::Pose3> >("ParameterPose3").Base<AbstractParameter>();
00066 
00067     MetaClass::Register<Parameter<karto::gps::PointGps> >("ParameterPointGps").Base<AbstractParameter>();
00068 
00069     MetaClass::Register<ParameterEnum>("ParameterEnum").Base<Parameter<kt_int64s> >();
00070 
00071 
00072     MetaClass::Register<Object>("Object")
00073       .Base<Parameter<kt_int32s> >();
00074 
00075     // Objects
00076 
00077     MetaClass::Register<ModuleParameters>("ModuleParameters")
00078       .Base<Object>()
00079       .Attribute("ObjectType", ObjectType_ModuleParameters);
00080 
00081     MetaClass::Register<CustomItem>("CustomItem")
00082       .Base<Object>();
00083 
00084     MetaClass::Register<DatasetInfo>("DatasetInfo")
00085       .Base<Object>()
00086       .Attribute("ObjectType", ObjectType_DatasetInfo);
00087 
00088     // Sensors
00089 
00090     MetaClass::Register<Sensor>("Sensor")
00091       .Base<Object>()
00092       .Attribute("ObjectType", ObjectType_Sensor);
00093 
00094     MetaClass::Register<Drive>("Drive")
00095       .Base<Sensor>()
00096       .Attribute("ObjectType", ObjectType_Drive);
00097 
00098     MetaClass::Register<LaserRangeFinder>("LaserRangeFinder")
00099       .Base<Sensor>()
00100       .Attribute("ObjectType", ObjectType_LaserRangeFinder)
00101       .Parameter("MinimumAngle", &LaserRangeFinder::GetMinimumAngle, &LaserRangeFinder::SetMinimumAngle)
00102       .Parameter("MaximumAngle", &LaserRangeFinder::GetMaximumAngle, &LaserRangeFinder::SetMaximumAngle)
00103       .Parameter("AngularResolution", &LaserRangeFinder::GetAngularResolution, &LaserRangeFinder::SetAngularResolution)
00104       .Parameter("MinimumRange", &LaserRangeFinder::GetMinimumRange, &LaserRangeFinder::SetMinimumRange)
00105       .Parameter("MaximumRange", &LaserRangeFinder::GetMaximumRange, &LaserRangeFinder::SetMaximumRange)
00106       .Parameter("RangeThreshold", &LaserRangeFinder::GetRangeThreshold, &LaserRangeFinder::SetRangeThreshold);
00107 //      .Parameter("Type", &LaserRangeFinder::GetType, &LaserRangeFinder::SetType);
00108 
00109     // SensorData
00110     MetaClass::Register<SensorData>("SensorData")
00111       .Base<Object>()
00112       .Attribute("ObjectType", ObjectType_SensorData);
00113 
00114     MetaClass::Register<LaserRangeScan>("LaserRangeScan")
00115       .Base<SensorData>()
00116       .Attribute("ObjectType", ObjectType_LaserRangeScan);
00117 
00118     MetaClass::Register<DrivePose>("DrivePose")
00119       .Base<SensorData>()
00120       .Attribute("ObjectType", ObjectType_DrivePose);
00121 
00122     MetaClass::Register<LocalizedObject>("LocalizedObject")
00123       .Base<SensorData>()
00124       .Attribute("ObjectType", ObjectType_LocalizedObject);
00125 
00126     MetaClass::Register<LocalizedLaserScan>("LocalizedLaserScan")
00127       .Base<LocalizedObject>()
00128       .Attribute("ObjectType", ObjectType_LocalizedLaserScan);
00129 
00130     MetaClass::Register<LocalizedPointScan>("LocalizedPointScan")
00131       .Base<LocalizedLaserScan>()
00132       .Attribute("ObjectType", ObjectType_LocalizedPointScan);
00133 
00134     MetaClass::Register<LocalizedRangeScan>("LocalizedRangeScan")
00135       .Base<LocalizedLaserScan>()
00136       .Attribute("ObjectType", ObjectType_LocalizedRangeScan);
00137 
00138     // Grid
00139     MetaClass::Register<Grid<kt_int8u> >("GridInt8u")
00140       .Base<Object>();
00141 
00142     MetaClass::Register<Grid<kt_int32u> >("GridInt32u")
00143       .Base<Object>();
00144 
00145     MetaClass::Register<Grid<kt_float> >("GridFloat")
00146       .Base<Object>();
00147 
00148     MetaClass::Register<Grid<kt_double> >("GridDouble")
00149       .Base<Object>();
00150 
00151     MetaClass::Register<OccupancyGrid>("OccupancyGrid")
00152       .Base<Grid<kt_int8u> >()
00153       .Attribute("ObjectType", ObjectType_OccupancyGrid);
00154   }
00155 
00156 }


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:17