SUMO - Simulation of Urban MObility
AGChild.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-2018 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 /****************************************************************************/
20 // Person in age to go to school: linked to a school object
21 /****************************************************************************/
22 #ifndef AGCHILD_H
23 #define AGCHILD_H
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #include <config.h>
30 
31 #include <iostream>
32 #include <vector>
33 #include "AGPerson.h"
34 #include "AGPosition.h"
35 #include "AGSchool.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
41 class AGChild : public AGPerson {
42 public:
43  AGChild(int age) :
44  AGPerson(age),
45  school(NULL) {};
46  void print() const;
47  bool setSchool(AGSchool* school);
53  bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
57  bool leaveSchool();
58  bool haveASchool() const;
60  int getSchoolOpening() const;
61  int getSchoolClosing() const;
62 
63 private:
65 };
66 
67 #endif
68 
69 /****************************************************************************/
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:56
bool leaveSchool()
Definition: AGChild.cpp:76
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:46
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:91
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:58
AGSchool * school
Definition: AGChild.h:64
void print() const
Puts out a summary of the class properties.
Definition: AGChild.cpp:41
int getSchoolOpening() const
Definition: AGChild.cpp:101
bool haveASchool() const
Definition: AGChild.cpp:86
int age
Definition: AGPerson.h:65
int getSchoolClosing() const
Definition: AGChild.cpp:96
Base class of every person in the city (adults and children)
Definition: AGPerson.h:42
AGChild(int age)
Definition: AGChild.h:43