SUMO - Simulation of Urban MObility
AGChild.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Person in age to go to school: linked to a school object
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2010-2014 DLR (http://www.dlr.de/) and contributors
14 // activitygen module
15 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
16 /****************************************************************************/
17 //
18 // This file is part of SUMO.
19 // SUMO is free software: you can redistribute it and/or modify
20 // it under the terms of the GNU General Public License as published by
21 // the Free Software Foundation, either version 3 of the License, or
22 // (at your option) any later version.
23 //
24 /****************************************************************************/
25 #ifndef AGCHILD_H
26 #define AGCHILD_H
27 
28 
29 // ===========================================================================
30 // included modules
31 // ===========================================================================
32 #ifdef _MSC_VER
33 #include <windows_config.h>
34 #else
35 #include <config.h>
36 #endif
37 
38 #include <iostream>
39 #include <vector>
40 #include "AGPerson.h"
41 #include "AGPosition.h"
42 #include "AGSchool.h"
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
48 class AGChild : public AGPerson {
49 public:
50  AGChild(int age) :
51  AGPerson(age),
52  school(NULL) {};
53  void print();
54  bool setSchool(AGSchool* school);
60  bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
64  bool leaveSchool();
65  bool haveASchool() const;
67  int getSchoolOpening() const;
68  int getSchoolClosing() const;
69 
70 private:
72 };
73 
74 #endif
75 
76 /****************************************************************************/
bool haveASchool() const
Definition: AGChild.cpp:93
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:63
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:98
bool leaveSchool()
Definition: AGChild.cpp:83
void print()
Definition: AGChild.cpp:48
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:53
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:65
AGSchool * school
Definition: AGChild.h:71
int getSchoolClosing() const
Definition: AGChild.cpp:103
int age
Definition: AGPerson.h:72
int getSchoolOpening() const
Definition: AGChild.cpp:108
Base class of every person in the city (adults and children)
Definition: AGPerson.h:49
AGChild(int age)
Definition: AGChild.h:50