FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTvertexproperties.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 FMTvertexproperties_H_INCLUDED
9#define FMTvertexproperties_H_INCLUDED
10
11
12#include <boost/serialization/serialization.hpp>
13#include <boost/serialization/unique_ptr.hpp>
14#include <memory>
16
17namespace Core
18{
19 class FMTfuturdevelopment;
20 class FMTactualdevelopment;
21}
22
23
24
25namespace Graph
26{
28 {
30 template<class Archive>
31 void serialize(Archive& ar, const unsigned int version)
32 {
33 ar & boost::serialization::make_nvp("FMTbasevertexproperties", boost::serialization::base_object<FMTbasevertexproperties>(*this));
34 ar & BOOST_SERIALIZATION_NVP(constraintID);
35 }
36 int constraintID;
37 public:
43 const int& lconstraintID);
45 const int& lconstraintID);
47 const int& lconstraintID);
48 std::string constraintname() const;
49 inline int getconstraintID() const override
50 {
51 return constraintID;
52 }
53 void setconstraintID(const int& ID);
54 };
55}
56
57BOOST_CLASS_EXPORT_KEY(Graph::FMTvertexproperties)
58
59namespace boost {
60
61 template <>
62 struct hash<Graph::FMTvertexproperties>
63 {
64 std::size_t operator()(const Graph::FMTvertexproperties& vertex_properties) const
65 {
66 return vertex_properties.hash();
67 }
68 };
69
70
71}
72
73
74#endif
Definition: FMTactualdevelopment.hpp:25
Definition: FMTdevelopment.hpp:44
Definition: FMTfuturdevelopment.hpp:24
Definition: FMTbasevertexproperties.hpp:23
Definition: FMTvertexproperties.hpp:28
void setconstraintID(const int &ID)
FMTvertexproperties & operator=(const FMTvertexproperties &rhs)=default
FMTvertexproperties(const Core::FMTactualdevelopment &ldevelopment, const int &lconstraintID)
std::string constraintname() const
FMTvertexproperties(const Core::FMTfuturdevelopment &ldevelopment, const int &lconstraintID)
int getconstraintID() const override
Definition: FMTvertexproperties.hpp:49
friend class boost::serialization::access
Definition: FMTvertexproperties.hpp:29
FMTvertexproperties(const Core::FMTdevelopment &ldevelopment, const int &lconstraintID)
FMTvertexproperties(const FMTvertexproperties &rhs)
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31
Definition: FMTaction.hpp:364
std::size_t operator()(const Graph::FMTvertexproperties &vertex_properties) const
Definition: FMTvertexproperties.hpp:64