FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
routepathersearch.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2019 by the FIFE team *
3  * http://www.fifengine.net *
4  * This file is part of FIFE. *
5  * *
6  * FIFE is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef FIFE_PATHFINDER_ROUTEPATHERSEARCH
23 #define FIFE_PATHFINDER_ROUTEPATHERSEARCH
24 
25 // Standard C++ library includes
26 
27 // 3rd party library includes
28 
29 // FIFE includes
30 // These includes are split up in two parts, separated by one empty line
31 // First block: files included from the FIFE root src directory
32 // Second block: files included from the same folder
34 
35 namespace FIFE {
36 
37  class CellCache;
38  class Route;
39 
44  public:
50  RoutePatherSearch(Route* route, const int32_t sessionId);
51 
52  virtual ~RoutePatherSearch();
53 
57  enum SearchStatus {
61  };
62 
67  virtual void updateSearch() = 0;
68 
73  virtual void calcPath() = 0;
74 
79  int32_t getSessionId() const;
80 
85  int32_t getSearchStatus() const;
86 
91  Route* getRoute();
92 
93  protected:
99  void setSearchStatus(const SearchStatus status);
100 
103 
106 
109 
112 
114  std::vector<Cell*> m_ignoredBlockers;
115 
116  private:
118  int32_t m_sessionId;
119 
122  };
123 }
124 #endif
int32_t getSearchStatus() const
A small function which returns the current status of the search.
Route * getRoute()
Returns the associated route for this search.
void setSearchStatus(const SearchStatus status)
Sets the current status of the search.
RoutePatherSearch(Route *route, const int32_t sessionId)
Constructor.
bool m_specialCost
Indicates if the search should use special costs.
SearchStatus
An enumeration of the different status the search can be in.
A basic route.
Definition: route.h:64
std::vector< Cell * > m_ignoredBlockers
Blockers from a multi cell object which should be ignored.
bool m_ignoreDynamicBlockers
Indicates if dynamic blockers should be ignored.
virtual void calcPath()=0
Calculates final path.
virtual void updateSearch()=0
Updates the search.
SearchStatus m_status
An enumeration of the searches current status.
int32_t getSessionId() const
Retrieves the session id.
RoutePatherSearch using A*.
bool m_multicell
Indicates if the route is for a multi cell object.
int32_t m_sessionId
An integer containing the session id for this search.
Route * m_route
Pointer to route.