SUMO - Simulation of Urban MObility
AGSchool.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Correspond to given ages and referenced by children. Has a precise location.
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 // activitygen module
14 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 #ifndef AGSCHOOL_H
25 #define AGSCHOOL_H
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 #include <iostream>
38 #include "AGPosition.h"
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
44 class AGSchool {
45 public:
46  AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close) :
47  beginAge(beginAge),
48  endAge(endAge),
49  capacity(capacity_),
50  initCapacity(capacity_),
51  location(pos),
52  opening(open),
53  closing(close) {};
54  void print();
55  int getPlaces();
56  bool addNewChild();
57  bool removeChild();
58  int getBeginAge();
59  int getEndAge();
60  bool acceptThisAge(int age);
62  int getClosingHour();
63  int getOpeningHour();
64 
65 private:
67  int capacity;
71 };
72 
73 #endif
74 
75 /****************************************************************************/
int capacity
Definition: AGSchool.h:67
int endAge
Definition: AGSchool.h:66
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:63
bool addNewChild()
Definition: AGSchool.cpp:55
int closing
Definition: AGSchool.h:70
AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close)
Definition: AGSchool.h:46
AGPosition getPosition()
Definition: AGSchool.cpp:91
int opening
Definition: AGSchool.h:70
bool acceptThisAge(int age)
Definition: AGSchool.cpp:73
AGPosition location
Definition: AGSchool.h:69
int getEndAge()
Definition: AGSchool.cpp:86
bool removeChild()
Definition: AGSchool.cpp:64
int getOpeningHour()
Definition: AGSchool.cpp:101
void print()
Definition: AGSchool.cpp:45
int getBeginAge()
Definition: AGSchool.cpp:81
int getClosingHour()
Definition: AGSchool.cpp:96
int getPlaces()
Definition: AGSchool.cpp:50
int initCapacity
Definition: AGSchool.h:68
int beginAge
Definition: AGSchool.h:66