MRPT  2.0.4
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-2020, 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(
30  mrpt::config::CConfigFileBase& c, const std::string& s) const
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(
45  mrpt::serialization::CArchive& in, uint8_t version)
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.
#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...
mrpt::config::CConfigFileBase CConfigFileBase
This namespace contains representation of robot actions and observations.
#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:54
mrpt::vision::TStereoCalibResults out
Common params to all maps derived from mrpt::maps::CMetricMap.
#define MRPT_SAVE_CONFIG_VAR_COMMENT(variableName, __comment)



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020