MRPT  1.9.9
THypothesisIDSet.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "hmtslam-precomp.h" // Precomp header
11 
12 using namespace mrpt::hmtslam;
13 
15 
16 uint8_t THypothesisIDSet::serializeGetVersion() const { return 0; }
18 {
19  uint32_t N = (uint32_t)size();
20  out << N;
21  for (const_iterator it = begin(); it != end(); ++it) out << *it;
22 }
23 
26 {
27  switch (version)
28  {
29  case 0:
30  {
31  uint32_t i, N;
32  in >> N;
33 
34  clear();
35  for (i = 0; i < N; i++)
36  {
37  THypothesisID tmp;
38  in >> tmp;
39  insert(tmp);
40  }
41  }
42  break;
43  default:
45  };
46 }
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
EIGEN_STRONG_INLINE iterator begin()
Definition: eigen_plugins.h:29
unsigned char uint8_t
Definition: rptypes.h:41
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:90
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
GLuint GLuint end
Definition: glext.h:3528
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:52
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
GLuint in
Definition: glext.h:7274
GLsizeiptr size
Definition: glext.h:3923
unsigned __int32 uint32_t
Definition: rptypes.h:47
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:186
const Scalar * const_iterator
Definition: eigen_plugins.h:27



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020