Fawkes API  Fawkes Development Version
navgraph_stconstr_thread.h
1 /***************************************************************************
2  * navgraph_stconstr_thread.h - static constraints for navgraph
3  *
4  * Created: Fri Jul 11 17:31:47 2014
5  * Copyright 2014 Tim Niemueller [www.niemueller.de]
6  ****************************************************************************/
7 
8 /* This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Library General Public License for more details.
17  *
18  * Read the full text in the LICENSE.GPL file in the doc directory.
19  */
20 
21 #ifndef __PLUGINS_NAVGRAPH_NAVGRAPH_STCONSTR_THREAD_H_
22 #define __PLUGINS_NAVGRAPH_NAVGRAPH_STCONSTR_THREAD_H_
23 
24 #include <core/threading/thread.h>
25 #include <aspect/configurable.h>
26 #include <aspect/logging.h>
27 
28 #include <navgraph/navgraph.h>
29 #include <navgraph/aspect/navgraph.h>
30 #include <navgraph/constraints/constraint_repo.h>
31 
32 namespace fawkes {
33  class NavGraphStaticListNodeConstraint;
34  class NavGraphStaticListEdgeConstraint;
35  class NavGraphStaticListEdgeCostConstraint;
36  class NavGraphPolygonNodeConstraint;
37  class NavGraphPolygonEdgeConstraint;
38 }
39 
41 : public fawkes::Thread,
42  public fawkes::LoggingAspect,
45 {
46  public:
49 
50  virtual void init();
51  virtual void loop();
52  virtual void finalize();
53 
54  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
55  protected: virtual void run() { Thread::run();}
56 
57  private:
60  fawkes::NavGraphStaticListEdgeCostConstraint *edge_cost_constraint_;
61  fawkes::NavGraphPolygonNodeConstraint *node_poly_constraint_;
62  fawkes::NavGraphPolygonEdgeConstraint *edge_poly_constraint_;
63 };
64 
65 #endif
Thread to statically block certain nodes from config.
Constraint that blocks nodes inside a polygon.
Fawkes library namespace.
virtual void run()
Code to execute in the thread.
Definition: thread.cpp:939
Constraint that hold cost factors for a static list of edges.
Thread class encapsulation of pthreads.
Definition: thread.h:42
Constraint that blocks nodes within and edges touching a polygon.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to log output.
Definition: logging.h:35
Thread aspect to access configuration data.
Definition: configurable.h:35
Constraint that holds a list of edges to block.
Constraint that holds a list of nodes to block.
Thread aspect to access NavGraph.
Definition: navgraph.h:37