SUMO - Simulation of Urban MObility
AGSchool.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 /****************************************************************************/
7 //
8 // This program and the accompanying materials
9 // are made available under the terms of the Eclipse Public License v2.0
10 // which accompanies this distribution, and is available at
11 // http://www.eclipse.org/legal/epl-v20.html
12 //
13 /****************************************************************************/
21 // Correspond to given ages and referenced by children. Has a precise location.
22 /****************************************************************************/
23 #ifndef AGSCHOOL_H
24 #define AGSCHOOL_H
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <iostream>
37 #include "AGPosition.h"
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
43 class AGSchool {
44 public:
45  AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close) :
46  beginAge(beginAge),
47  endAge(endAge),
48  capacity(capacity_),
49  initCapacity(capacity_),
50  location(pos),
51  opening(open),
52  closing(close) {};
53  void print() const;
54  int getPlaces();
55  bool addNewChild();
56  bool removeChild();
57  int getBeginAge();
58  int getEndAge();
59  bool acceptThisAge(int age);
61  int getClosingHour();
62  int getOpeningHour();
63 
64 private:
66  int capacity;
70 };
71 
72 #endif
73 
74 /****************************************************************************/
int capacity
Definition: AGSchool.h:66
void print() const
Definition: AGSchool.cpp:44
int endAge
Definition: AGSchool.h:65
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:62
bool addNewChild()
Definition: AGSchool.cpp:54
int closing
Definition: AGSchool.h:69
AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close)
Definition: AGSchool.h:45
AGPosition getPosition()
Definition: AGSchool.cpp:90
int opening
Definition: AGSchool.h:69
bool acceptThisAge(int age)
Definition: AGSchool.cpp:72
AGPosition location
Definition: AGSchool.h:68
int getEndAge()
Definition: AGSchool.cpp:85
bool removeChild()
Definition: AGSchool.cpp:63
int getOpeningHour()
Definition: AGSchool.cpp:100
int getBeginAge()
Definition: AGSchool.cpp:80
int getClosingHour()
Definition: AGSchool.cpp:95
int getPlaces()
Definition: AGSchool.cpp:49
int initCapacity
Definition: AGSchool.h:67
int beginAge
Definition: AGSchool.h:65