Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 // SPDX-License-Identifier: EPL-2.0
11 /****************************************************************************/
19 // Correspond to given ages and referenced by children. Has a precise location.
20 /****************************************************************************/
21 #ifndef AGSCHOOL_H
22 #define AGSCHOOL_H
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #include <config.h>
29 
30 #include <iostream>
31 #include "AGPosition.h"
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
37 class AGSchool {
38 public:
39  AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close) :
41  endAge(endAge),
42  capacity(capacity_),
43  initCapacity(capacity_),
44  location(pos),
45  opening(open),
46  closing(close) {};
47  void print() const;
48  int getPlaces();
49  bool addNewChild();
50  bool removeChild();
51  int getBeginAge();
52  int getEndAge();
53  bool acceptThisAge(int age);
55  int getClosingHour();
56  int getOpeningHour();
57 
58 private:
60  int capacity;
64 };
65 
66 #endif
67 
68 /****************************************************************************/
AGSchool::beginAge
int beginAge
Definition: AGSchool.h:59
AGSchool::addNewChild
bool addNewChild()
Definition: AGSchool.cpp:48
AGSchool::initCapacity
int initCapacity
Definition: AGSchool.h:61
AGSchool::print
void print() const
Definition: AGSchool.cpp:38
AGSchool::endAge
int endAge
Definition: AGSchool.h:59
AGSchool::capacity
int capacity
Definition: AGSchool.h:60
AGSchool
Definition: AGSchool.h:37
AGSchool::getPosition
AGPosition getPosition()
Definition: AGSchool.cpp:84
AGSchool::opening
int opening
Definition: AGSchool.h:63
AGSchool::location
AGPosition location
Definition: AGSchool.h:62
AGSchool::acceptThisAge
bool acceptThisAge(int age)
Definition: AGSchool.cpp:66
AGSchool::removeChild
bool removeChild()
Definition: AGSchool.cpp:57
AGSchool::closing
int closing
Definition: AGSchool.h:63
AGSchool::getEndAge
int getEndAge()
Definition: AGSchool.cpp:79
AGSchool::AGSchool
AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close)
Definition: AGSchool.h:39
AGSchool::getBeginAge
int getBeginAge()
Definition: AGSchool.cpp:74
AGSchool::getOpeningHour
int getOpeningHour()
Definition: AGSchool.cpp:94
AGPosition.h
AGPosition
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:56
AGSchool::getClosingHour
int getClosingHour()
Definition: AGSchool.cpp:89
config.h
AGSchool::getPlaces
int getPlaces()
Definition: AGSchool.cpp:43