DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
vesselsloglikecatchestable.h
Go to the documentation of this file.
1 #ifndef VESSELSLOGLIKECATCHESTABLE_H
2 #define VESSELSLOGLIKECATCHESTABLE_H
3 
4 #include "commons_global.h"
5 #include "idtypes.h"
6 
7 #include "sqlitefielddef.h"
8 #include "sqlitetable.h"
9 using namespace sqlite;
10 
11 #include <vector>
12 #include <string>
13 
14 class Population;
15 
17 {
18 private:
19  struct Impl;
20  std::unique_ptr<Impl> p;
21 
22 public:
23  const FieldDef<FieldType::Integer> fldLoglikeId = makeFieldDef("LoglikeId", FieldType::Integer()).notNull();
24  const FieldDef<FieldType::Integer> fldPopId = makeFieldDef("PopId",FieldType::Integer()).notNull();
25  const FieldDef<FieldType::Real> fldCatches = makeFieldDef("Catches",FieldType::Real()).notNull();
26  const FieldDef<FieldType::Real> fldDiscards = makeFieldDef("Discards",FieldType::Real()).notNull();
27 
28  VesselsLoglikeCatchesTable(std::shared_ptr<SQLiteStorage> db, std::string name);
29  ~VesselsLoglikeCatchesTable() noexcept;
30 
31  void dropAndCreate();
32 
33  void insertPopulation (size_t rowid, int population, const std::vector<double> &catches, const std::vector<double> &discards);
34 };
35 
36 #endif // VESSELSLOGLIKECATCHESTABLE_H
Definition: sqliteoutputstorage.h:33
Definition: pathshop.cpp:8
Definition: vesselsloglikecatchestable.h:16
Definition: vesselsloglikecatchestable.cpp:5
Definition: Population.h:34
#define COMMONSSHARED_EXPORT
Definition: commons_global.h:23