MIRA
TopoMapFwd.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2013,
3  Neuroinformatics and Cognitive Robotics Labs at TU Ilmenau, Germany
4 
5 All rights reserved.
6 
7 Copying, resale, or redistribution, with or without modification, is strictly
8 prohibited.
9 
10 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
13 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
14 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES,
15 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 */
17 
26 #pragma once
27 
28 #include <boost/shared_ptr.hpp>
29 #include <boost/make_shared.hpp>
30 
31 #include <set>
32 
33 namespace viros { namespace topomap {
34 
36 
37 // forward decl.
38 class Attribute;
39 class ActionAttribute;
40 class InitActionAttribute;
41 class MapAttribute;
42 class RegionAttribute;
43 class CostMapAttribute;
44 
45 class GraphElement;
46 class NamedGraphElement;
47 class AttributedGraphElement;
48 
49 class Node;
50 
51 class Gateway;
52 class GatewayNode;
53 
54 class Link;
55 
56 class TopoMap;
57 
58 
59 #define OPERATOR_LESS_DECLARE(CLASS) \
60 bool operator<(CLASS const& a, CLASS const& b);
61 
62 OPERATOR_LESS_DECLARE(ActionAttribute);
63 OPERATOR_LESS_DECLARE(InitActionAttribute);
64 OPERATOR_LESS_DECLARE(MapAttribute);
65 OPERATOR_LESS_DECLARE(CostMapAttribute);
66 OPERATOR_LESS_DECLARE(NamedGraphElement);
67 OPERATOR_LESS_DECLARE(AttributedGraphElement);
69 OPERATOR_LESS_DECLARE(GatewayNode);
71 
72 
73 typedef boost::shared_ptr<Attribute> AttributePtr;
74 typedef boost::shared_ptr<ActionAttribute> ActionAttributePtr;
75 typedef boost::shared_ptr<InitActionAttribute> InitActionAttributePtr;
76 typedef boost::shared_ptr<MapAttribute> MapAttributePtr;
77 typedef boost::shared_ptr<RegionAttribute> RegionAttributePtr;
78 typedef boost::shared_ptr<CostMapAttribute> CostMapAttributePtr;
79 
80 typedef boost::shared_ptr<GraphElement> GraphElementPtr;
81 typedef boost::shared_ptr<NamedGraphElement> NamedGraphElementPtr;
82 typedef boost::shared_ptr<AttributedGraphElement> AttributedGraphElementPtr;
83 
84 typedef boost::shared_ptr<Node> NodePtr;
85 
86 typedef boost::shared_ptr<Gateway> GatewayPtr;
87 typedef boost::shared_ptr<GatewayNode> GatewayNodePtr;
88 
89 typedef boost::shared_ptr<Link> LinkPtr;
90 
91 typedef boost::shared_ptr<TopoMap> TopoMapPtr;
92 
93 
94 template<typename T>
96  bool operator()(boost::shared_ptr<T> const& a, boost::shared_ptr<T> const& b) const {
97  return *a < *b;
98  }
99 };
100 
101 typedef std::set<NodePtr, shared_ptr_sort<Node>> NodeSet;
102 typedef std::set<GatewayNodePtr, shared_ptr_sort<GatewayNode>> GatewayNodeSet;
103 typedef std::set<LinkPtr, shared_ptr_sort<Link>> LinkSet;
104 
106 
107 } } // namespace
Definition: TopoMapFwd.h:95
boost::shared_ptr< Link > LinkPtr
Definition: TopoMapFwd.h:89
OPERATOR_LESS_DECLARE(ActionAttribute)
boost::shared_ptr< ActionAttribute > ActionAttributePtr
Definition: TopoMapFwd.h:74
bool operator()(boost::shared_ptr< T > const &a, boost::shared_ptr< T > const &b) const
Definition: TopoMapFwd.h:96
boost::shared_ptr< GatewayNode > GatewayNodePtr
Definition: TopoMapFwd.h:87
boost::shared_ptr< CostMapAttribute > CostMapAttributePtr
Definition: TopoMapFwd.h:78
boost::shared_ptr< Attribute > AttributePtr
Definition: TopoMapFwd.h:73
boost::shared_ptr< NamedGraphElement > NamedGraphElementPtr
Definition: TopoMapFwd.h:81
std::set< NodePtr, shared_ptr_sort< Node > > NodeSet
Definition: TopoMapFwd.h:101
boost::shared_ptr< InitActionAttribute > InitActionAttributePtr
Definition: TopoMapFwd.h:75
boost::shared_ptr< RegionAttribute > RegionAttributePtr
Definition: TopoMapFwd.h:77
boost::shared_ptr< Gateway > GatewayPtr
Definition: TopoMapFwd.h:86
boost::shared_ptr< AttributedGraphElement > AttributedGraphElementPtr
Definition: TopoMapFwd.h:82
boost::shared_ptr< GraphElement > GraphElementPtr
Definition: TopoMapFwd.h:80
std::set< LinkPtr, shared_ptr_sort< Link > > LinkSet
Definition: TopoMapFwd.h:103
boost::shared_ptr< TopoMap > TopoMapPtr
Definition: TopoMapFwd.h:91
boost::shared_ptr< Node > NodePtr
Definition: TopoMapFwd.h:84
Definition: MetricCostmapTopoMapPlanner.h:45
boost::shared_ptr< MapAttribute > MapAttributePtr
Definition: TopoMapFwd.h:76
std::set< GatewayNodePtr, shared_ptr_sort< GatewayNode > > GatewayNodeSet
Definition: TopoMapFwd.h:102