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-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 /****************************************************************************/
22 // Person in age to go to school: linked to a school object
23 /****************************************************************************/
24 #ifndef AGCHILD_H
25 #define AGCHILD_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 <vector>
39 #include "AGPerson.h"
40 #include "AGPosition.h"
41 #include "AGSchool.h"
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
47 class AGChild : public AGPerson {
48 public:
49  AGChild(int age) :
50  AGPerson(age),
51  school(NULL) {};
52  void print() const;
53  bool setSchool(AGSchool* school);
59  bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
63  bool leaveSchool();
64  bool haveASchool() const;
66  int getSchoolOpening() const;
67  int getSchoolClosing() const;
68 
69 private:
71 };
72 
73 #endif
74 
75 /****************************************************************************/
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:62
bool leaveSchool()
Definition: AGChild.cpp:82
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:52
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:97
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:64
AGSchool * school
Definition: AGChild.h:70
void print() const
Puts out a summary of the class properties.
Definition: AGChild.cpp:47
int getSchoolOpening() const
Definition: AGChild.cpp:107
bool haveASchool() const
Definition: AGChild.cpp:92
int age
Definition: AGPerson.h:71
int getSchoolClosing() const
Definition: AGChild.cpp:102
Base class of every person in the city (adults and children)
Definition: AGPerson.h:48
AGChild(int age)
Definition: AGChild.h:49