FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTeventrelation.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTeventrelation_H_INCLUDED
9#define FMTeventrelation_H_INCLUDED
10
11#include "FMTcoordinate.hpp"
12#include <boost/functional/hash.hpp>
13
14namespace Spatial
15{
16 class FMTevent;
17}
18
19namespace Spatial
20{
22 {
23 int fromaction;
24 int toaction;
25 int fromperiod;
26 int toperiod;
27 FMTcoordinate fromcoord;
28 FMTcoordinate tocoord;
29 public:
30 FMTeventrelation(const Spatial::FMTevent& fromevent, const Spatial::FMTevent& toevent);
31 bool operator == (const FMTeventrelation& rhs) const;
32 size_t hash() const;
33 FMTeventrelation(const FMTeventrelation& rhs) = default;
35 ~FMTeventrelation() = default;
36 };
37
38}
39
40namespace boost
41 {
42 template <>
43 struct hash<Spatial::FMTeventrelation>
44 {
45 std::size_t operator()(const Spatial::FMTeventrelation& relation) const
46 {
47 return relation.hash();
48 }
49 };
50 }
51
52
53#endif
Definition: FMTcoordinate.hpp:25
Definition: FMTevent.hpp:28
Definition: FMTeventrelation.hpp:22
FMTeventrelation & operator=(const FMTeventrelation &rhs)=default
bool operator==(const FMTeventrelation &rhs) const
FMTeventrelation(const Spatial::FMTevent &fromevent, const Spatial::FMTevent &toevent)
FMTeventrelation(const FMTeventrelation &rhs)=default
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36
Definition: FMTaction.hpp:364
std::size_t operator()(const Spatial::FMTeventrelation &relation) const
Definition: FMTeventrelation.hpp:45