MRPT  1.9.9
metric_map_types.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "obs-precomp.h" // Precompiled headers
11 
16 
17 using namespace mrpt::obs;
18 using namespace mrpt::maps;
19 
21 
22 void TMapGenericParams::loadFromConfigFile(
23  const mrpt::config::CConfigFileBase& source, const std::string& sct)
24 {
25  MRPT_LOAD_CONFIG_VAR(enableSaveAs3DObject, bool, source, sct);
26  MRPT_LOAD_CONFIG_VAR(enableObservationLikelihood, bool, source, sct);
27  MRPT_LOAD_CONFIG_VAR(enableObservationInsertion, bool, source, sct);
28 }
29 void TMapGenericParams::saveToConfigFile(
31 {
32  // Common:
33  MRPT_SAVE_CONFIG_VAR_COMMENT(enableSaveAs3DObject, "");
34  MRPT_SAVE_CONFIG_VAR_COMMENT(enableObservationLikelihood, "");
35  MRPT_SAVE_CONFIG_VAR_COMMENT(enableObservationInsertion, "");
36 }
37 
38 uint8_t TMapGenericParams::serializeGetVersion() const { return 0; }
39 void TMapGenericParams::serializeTo(mrpt::serialization::CArchive& out) const
40 {
41  out << enableSaveAs3DObject << enableObservationLikelihood
42  << enableObservationInsertion;
43 }
44 void TMapGenericParams::serializeFrom(
46 {
47  switch (version)
48  {
49  case 0:
50  {
51  in >> enableSaveAs3DObject >> enableObservationLikelihood >>
52  enableObservationInsertion;
53  }
54  break;
55  default:
57  };
58 }
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
STL namespace.
GLdouble s
Definition: glext.h:3682
unsigned char uint8_t
Definition: rptypes.h:44
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:97
This class allows loading and storing values and vectors of different types from a configuration text...
const GLubyte * c
Definition: glext.h:6406
mrpt::config::CConfigFileBase CConfigFileBase
This namespace contains representation of robot actions and observations.
GLsizei const GLchar ** string
Definition: glext.h:4116
#define MRPT_LOAD_CONFIG_VAR( variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:53
Common params to all maps derived from mrpt::maps::CMetricMap.
GLuint in
Definition: glext.h:7391
GLsizei GLsizei GLchar * source
Definition: glext.h:4097
#define MRPT_SAVE_CONFIG_VAR_COMMENT(variableName, __comment)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019