MRPT  1.9.9
TNodeAnnotations.h
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 #pragma once
10 
11 #include <mrpt/core/exceptions.h>
12 #include <mrpt/graphs/TNodeID.h>
15 #include <cstdint>
16 #include <iostream>
17 #include <string>
18 
19 namespace mrpt::graphs::detail
20 {
21 /**\brief Abstract class from which NodeAnnotations related classes can be
22  * implemented
23  *
24  * \ingroup mrpt_graphs_grp
25  */
27 {
29 
30  /**\brief Constructor */
31  TNodeAnnotations() = default;
32  /**\brief Destructor */
33  virtual ~TNodeAnnotations() = default;
34  /**\brief Generic copy constructor */
36  virtual void getAnnotsAsString(std::string* s) const { ASSERT_(s); }
38  {
39  std::string s;
40  this->getAnnotsAsString(&s);
41  return s;
42  }
43 
44  virtual bool operator==(const TNodeAnnotations& other) const
45  {
46  return true;
47  }
48  virtual bool operator!=(const TNodeAnnotations& other) const
49  {
50  return (!(*this == other));
51  }
52 
53  /**\brief Create and return a copy of the TNodeAnnotations object at hand.
54  *
55  * \warning Caller is responsible of afterwards deleting the object which is
56  * allocaed in heap
57  */
59  /**\brief Set the properties of the current TNodeAnnotations object
60  *
61  * \return True if setting the annotations part is successful.
62  */
63  bool setAnnots(const self_t& other) { return true; }
64  /**\brief Indicates if this is a dummy TNodeAnnotations struct or if it does
65  * contain meaningful data
66  */
67  bool is_node_annots_empty{false};
68 };
69 
70 /////////////////////////////////////////////////////////////////////////////
71 
72 /**\brief Struct to be used as the NODE_ANNOTATIONS template argument in
73  * CNetworkOfPoses class instances for use in multiple-robot SLAM applications
74  *
75  * \ingroup mrpt_graphs_grp
76  */
78 {
81 };
82 } // namespace mrpt::graphs::detail
Abstract class from which NodeAnnotations related classes can be implemented.
TNodeAnnotations()=default
Constructor.
GLdouble s
Definition: glext.h:3682
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:120
Internal functions for MRPT.
virtual ~TNodeAnnotations()=default
Destructor.
#define DECLARE_TTYPENAME_CLASSNAME(_CLASSNAME)
Like DECLARE_CUSTOM_TTYPENAME(), but for use within the class declaration body.
Definition: TTypeName.h:104
GLsizei const GLchar ** string
Definition: glext.h:4116
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: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019