Main MRPT website > C++ reference for 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 }
begin
EIGEN_STRONG_INLINE iterator begin()
Definition: eigen_plugins.h:29
mrpt::containers::clear
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:188
const_iterator
const Scalar * const_iterator
Definition: eigen_plugins.h:27
mrpt::hmtslam::THypothesisIDSet::serializeTo
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
Definition: THypothesisIDSet.cpp:17
end
GLuint GLuint end
Definition: glext.h:3528
mrpt::hmtslam::THypothesisIDSet::serializeFrom
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
Definition: THypothesisIDSet.cpp:24
uint8_t
unsigned char uint8_t
Definition: rptypes.h:41
hmtslam-precomp.h
mrpt::serialization::CArchive
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:48
mrpt::hmtslam
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
Definition: CHierarchicalMapMHPartition.h:30
mrpt::hmtslam::THypothesisIDSet
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps.
Definition: HMT_SLAM_common.h:78
IMPLEMENTS_SERIALIZABLE
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Definition: CSerializable.h:114
mrpt::hmtslam::THypothesisID
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
Definition: HMT_SLAM_common.h:61
in
GLuint in
Definition: glext.h:7274
MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
Definition: exceptions.h:90
size
GLsizeiptr size
Definition: glext.h:3923
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST