DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
vessellogbookoutputmessage.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3  * AND EFFORT DISPLACEMENT
4  * Copyright (c) 2012, 2013, 2014, 2015 Francois Bastardie <fba@aqua.dtu.dk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  * --------------------------------------------------------------------------
20  */
21 #ifndef VESSELLOGBOOKOUTPUTMESSAGE_H
22 #define VESSELLOGBOOKOUTPUTMESSAGE_H
23 
24 #include <outputmessage.h>
25 #include <ipcmsgtypes.h>
26 
27 #include <ostream>
28 #include <string>
29 #include <vector>
30 
31 class Vessel;
32 class Population;
33 
35 {
36 public:
37  VesselLogbookOutputMessage(unsigned int _tstep, Vessel *v, const std::vector<Population *> &populations, std::vector <int> &implicit_pops);
38 
39  virtual IpcMessageTypes getType() const {
40  return VesselLogbook;
41  }
42 
43  bool process();
44  bool send(std::ostream &);
45  virtual size_t sendBinary(void *buffer, size_t maxlen);
46 
47 private:
48  std::string name, freq_metiers;
49  int length_class;
50 
51  std::vector<double> cumul;
52  std::vector<double> cumul_discards;
53 
55 };
56 
57 #endif // VESSELLOGBOOKOUTPUTMESSAGE_H
VesselLogbookOutputMessage(unsigned int, Vessel *, const std::vector< Population * > &, std::vector< int > &)
Definition: noipc.h:24
Definition: noipc.h:21
an abstract class to serialize outputs through the OutputQueueManager
Definition: noipc.h:11
Definition: ipcmsgtypes.h:72
vector< int > implicit_pops
Definition: main.cpp:238
IpcMessageTypes
Definition: ipcmsgtypes.h:47
bool send(std::ostream &)
the operation to perform.
Definition: vessellogbookoutputmessage.cpp:142
bool process()
perform an operation non related to the gui feedback channel
Definition: vessellogbookoutputmessage.cpp:137
Definition: ipcmsgtypes.h:50
Definition: Population.h:34
virtual size_t sendBinary(void *buffer, size_t maxlen)
formats a binary block of data to be sent across the IPC stream
Definition: vessellogbookoutputmessage.cpp:186
vector< Population * > populations
Definition: main.cpp:202
virtual IpcMessageTypes getType() const
Definition: vessellogbookoutputmessage.h:39