MRPT  1.9.9
TNodeAnnotations.h
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 #ifndef TNODEANNOTATIONS_H
10 #define TNODEANNOTATIONS_H
11 
14 #include <mrpt/graphs/TNodeID.h>
15 #include <cstdint>
16 #include <mrpt/core/exceptions.h>
17 #include <iostream>
18 #include <string>
19 
20 namespace mrpt::graphs::detail
21 {
22 /**\brief Abstract class from which NodeAnnotations related classes can be
23  * implemented
24  *
25  * \ingroup mrpt_graphs_grp
26  */
28 {
30 
31  /**\brief Constructor */
33  /**\brief Destructor */
34  virtual ~TNodeAnnotations() {}
35  /**\brief Generic copy constructor */
37  virtual void getAnnotsAsString(std::string* s) const { ASSERT_(s); }
39  {
40  std::string s;
41  this->getAnnotsAsString(&s);
42  return s;
43  }
44 
45  virtual bool operator==(const TNodeAnnotations& other) const
46  {
47  return true;
48  }
49  virtual bool operator!=(const TNodeAnnotations& other) const
50  {
51  return (!(*this == other));
52  }
53 
54  /**\brief Create and return a copy of the TNodeAnnotations object at hand.
55  *
56  * \warning Caller is responsible of afterwards deleting the object which is
57  * allocaed in heap
58  */
60  /**\brief Set the properties of the current TNodeAnnotations object
61  *
62  * \return True if setting the annotations part is successful.
63  */
64  bool setAnnots(const self_t& other) { return true; }
65  /**\brief Indicates if this is a dummy TNodeAnnotations struct or if it does
66  * contain meaningful data
67  */
69 };
70 
71 /////////////////////////////////////////////////////////////////////////////
72 
73 /**\brief Struct to be used as the NODE_ANNOTATIONS template argument in
74  * CNetworkOfPoses class instances for use in multiple-robot SLAM applications
75  *
76  * \ingroup mrpt_graphs_grp
77  */
79 {
82 };
83 }
84 #endif /* end of include guard: TNODEANNOTATIONS_H */
85 
86 
Abstract class from which NodeAnnotations related classes can be implemented.
GLdouble s
Definition: glext.h:3676
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
Internal functions for MRPT.
#define DECLARE_TTYPENAME_CLASSNAME(_CLASSNAME)
Like DECLARE_CUSTOM_TTYPENAME(), but for use within the class declaration body.
Definition: TTypeName.h:100
GLsizei const GLchar ** string
Definition: glext.h:4101
bool setAnnots(const self_t &other)
Set the properties of the current TNodeAnnotations object.
virtual bool operator==(const TNodeAnnotations &other) const
bool is_node_annots_empty
Indicates if this is a dummy TNodeAnnotations struct or if it does contain meaningful data...
TNodeAnnotations * getCopyOfAnnots() const
Create and return a copy of the TNodeAnnotations object at hand.
virtual bool operator!=(const TNodeAnnotations &other) const
virtual void getAnnotsAsString(std::string *s) const
TNodeAnnotations(const TNodeAnnotations &other)
Generic copy constructor.
Struct to be used as the NODE_ANNOTATIONS template argument in CNetworkOfPoses class instances for us...



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