GCBM
mossdisturbancemodule.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_MOSS_DISTURBANCE_H_
2 #define MOJA_MODULES_CBM_MOSS_DISTURBANCE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
7 
8 namespace moja {
9  namespace modules {
10  namespace cbm {
11 
12  /*
13  Moss module to response to the fire disturbance events in CBM
14  */
15  class CBM_API MossDisturbanceModule : public CBMModuleBase {
16  public:
18  _runMoss = false;
19  };
20 
21  virtual ~MossDisturbanceModule() {};
22 
23  const std::string fireEvent = "fire";
24 
25  void configure(const DynamicObject& config) override;
26  void subscribe(NotificationCenter& notificationCenter) override;
27 
28  void doDisturbanceEvent(DynamicVar) override;
29  void doLocalDomainInit() override;
30  void doTimingInit() override;
31 
32  private:
33  bool _runMoss;
34 
35  typedef std::vector<CBMDistEventTransfer> EventVector;
36  typedef std::unordered_map<int, EventVector> EventMap;
37 
39  std::unordered_map<std::string, int> _dmAssociations;
40 
41  void fetchMossDistMatrices();
42  void fetchMossDMAssociations();
43  };
44  }
45  }
46 }
47 #endif
moja::modules::cbm::MossDisturbanceModule
Definition: mossdisturbancemodule.h:15
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::CBMModuleBase
Definition: cbmmodulebase.h:22
moja::modules::cbm::MossDisturbanceModule::~MossDisturbanceModule
virtual ~MossDisturbanceModule()
Definition: mossdisturbancemodule.h:21
moja::modules::cbm::MossDisturbanceModule::EventVector
std::vector< CBMDistEventTransfer > EventVector
Definition: mossdisturbancemodule.h:35
moja::modules::cbm::MossDisturbanceModule::MossDisturbanceModule
MossDisturbanceModule()
Definition: mossdisturbancemodule.h:17
moja::modules::cbm::MossDisturbanceModule::_dmAssociations
std::unordered_map< std::string, int > _dmAssociations
Definition: mossdisturbancemodule.h:39
cbmdisturbanceeventmodule.h
moja::modules::cbm::MossDisturbanceModule::_matrices
EventMap _matrices
Definition: mossdisturbancemodule.h:38
moja::modules::cbm::MossDisturbanceModule::EventMap
std::unordered_map< int, EventVector > EventMap
Definition: mossdisturbancemodule.h:36
moja::modules::cbm::MossDisturbanceModule::_runMoss
bool _runMoss
Definition: mossdisturbancemodule.h:33
moja
Definition: ageclasshelper.cpp:10
cbmmodulebase.h