Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/base.h
[mareframe] / trunk / gadget / base.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/base.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef base_h
2 :     #define base_h
3 :    
4 :     #include "areatime.h"
5 :     #include "hasname.h"
6 :     #include "livesonareas.h"
7 :    
8 :     /**
9 :     * \class BaseClass
10 :     * \brief This is the base class for any object that can be dynamically modelled within Gadget
11 :     * \note This will always be overridden by the derived classes (either Stock, Fleet or OtherFood)
12 :     */
13 :     class BaseClass : public HasName, public LivesOnAreas {
14 :     public:
15 :     /**
16 :     * \brief This is the default BaseClass constructor
17 :     */
18 :     BaseClass() {};
19 :     /**
20 :     * \brief This is the BaseClass constructor for an object with a name
21 :     * \param givenname is a text string containing the name of the object to be created
22 :     */
23 :     BaseClass(const char* givenname) : HasName(givenname) {};
24 :     /**
25 :     * \brief This is the BaseClass constructor for an object with a name and an area
26 :     * \param givenname is a text string containing the name of the object to be created
27 :     * \param Areas is the IntVector of internal areas to be used
28 :     */
29 :     BaseClass(const char* givenname, const IntVector& Areas) : HasName(givenname), LivesOnAreas(Areas) {};
30 :     /**
31 :     * \brief This is the default BaseClass destructor
32 :     */
33 :     virtual ~BaseClass() {};
34 :     /**
35 :     * \brief This function will update the model population for an area in the model
36 :     * \param area is an integer to denote the internal area of interest
37 :     * \param TimeInfo is the TimeClass for the current model
38 :     */
39 :     virtual void calcNumbers(int area, const TimeClass* const TimeInfo) = 0;
40 :     /**
41 :     * \brief This function will calculate the modelled consumption for an area in the model
42 :     * \param area is an integer to denote the internal area of interest
43 :     * \param Area is the AreaClass for the current model
44 :     * \param TimeInfo is the TimeClass for the current model
45 :     */
46 :     virtual void calcEat(int area, const AreaClass* const Area, const TimeClass* const TimeInfo) = 0;
47 :     /**
48 :     * \brief This function will check the modelled consumption for an area in the model
49 :     * \param area is an integer to denote the internal area of interest
50 :     * \param TimeInfo is the TimeClass for the current model
51 :     */
52 :     virtual void checkEat(int area, const TimeClass* const TimeInfo) = 0;
53 :     /**
54 :     * \brief This function will adjust the modelled consumption for an area in the model
55 :     * \param area is an integer to denote the internal area of interest
56 :     * \param TimeInfo is the TimeClass for the current model
57 :     */
58 :     virtual void adjustEat(int area, const TimeClass* const TimeInfo) = 0;
59 :     /**
60 :     * \brief This function will reduce the model population for an area in the model
61 :     * \param area is an integer to denote the internal area of interest
62 :     * \param TimeInfo is the TimeClass for the current model
63 :     */
64 :     virtual void reducePop(int area, const TimeClass* const TimeInfo) = 0;
65 :     /**
66 :     * \brief This function will calculate the growth of the model population for an area in the model
67 :     * \param area is an integer to denote the internal area of interest
68 :     * \param Area is the AreaClass for the current model
69 :     * \param TimeInfo is the TimeClass for the current model
70 :     */
71 :     virtual void Grow(int area, const AreaClass* const Area, const TimeClass* const TimeInfo) = 0;
72 :     /**
73 :     * \brief This function will calculate any transition of the model population for an area in the model
74 :     * \param area is an integer to denote the internal area of interest
75 :     * \param TimeInfo is the TimeClass for the current model
76 :     */
77 :     virtual void updateAgePart1(int area, const TimeClass* const TimeInfo) = 0;
78 :     /**
79 :     * \brief This function will calculate the age increase of the model population for an area in the model
80 :     * \param area is an integer to denote the internal area of interest
81 :     * \param TimeInfo is the TimeClass for the current model
82 :     */
83 :     virtual void updateAgePart2(int area, const TimeClass* const TimeInfo) = 0;
84 :     /**
85 :     * \brief This function will implement the transiton of the model population for an area in the model
86 :     * \param area is an integer to denote the internal area of interest
87 :     * \param TimeInfo is the TimeClass for the current model
88 :     */
89 :     virtual void updateAgePart3(int area, const TimeClass* const TimeInfo) = 0;
90 :     /**
91 :     * \brief This function will calculate the spawning of the model population for an area in the model
92 :     * \param area is an integer to denote the internal area of interest
93 :     * \param TimeInfo is the TimeClass for the current model
94 :     */
95 :     virtual void updatePopulationPart1(int area, const TimeClass* const TimeInfo) = 0;
96 :     /**
97 :     * \brief This function will calculate add the newly matured stock into the model population for an area in the model
98 :     * \param area is an integer to denote the internal area of interest
99 :     * \param TimeInfo is the TimeClass for the current model
100 :     */
101 :     virtual void updatePopulationPart2(int area, const TimeClass* const TimeInfo) = 0;
102 :     /**
103 :     * \brief This function will calculate add the new recruits into the model population for an area in the model
104 :     * \param area is an integer to denote the internal area of interest
105 :     * \param TimeInfo is the TimeClass for the current model
106 :     */
107 :     virtual void updatePopulationPart3(int area, const TimeClass* const TimeInfo) = 0;
108 :     /**
109 :     * \brief This function will calculate calculate the straying of the model population for an area in the model
110 :     * \param area is an integer to denote the internal area of interest
111 :     * \param TimeInfo is the TimeClass for the current model
112 :     */
113 :     virtual void updatePopulationPart4(int area, const TimeClass* const TimeInfo) = 0;
114 :     /**
115 :     * \brief This function will calculate add the strayed stock into the model population for an area in the model
116 :     * \param area is an integer to denote the internal area of interest
117 :     * \param TimeInfo is the TimeClass for the current model
118 :     */
119 :     virtual void updatePopulationPart5(int area, const TimeClass* const TimeInfo) = 0;
120 :     /**
121 :     * \brief This function will implement the migration of the model population for the model
122 :     * \param TimeInfo is the TimeClass for the current model
123 :     */
124 :     virtual void Migrate(const TimeClass* const TimeInfo) = 0;
125 :     /**
126 :     * \brief This function will reset the model population
127 :     * \param TimeInfo is the TimeClass for the current model
128 :     */
129 :     virtual void Reset(const TimeClass* const TimeInfo) = 0;
130 :     /**
131 :     * \brief This function will print the model population
132 :     * \param outfile is the ofstream that all the model information gets sent to
133 :     */
134 :     virtual void Print(ofstream& outfile) const = 0;
135 :     };
136 :    
137 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge