SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AGChild.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Person in age to go to school: linked to a school object
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 // activitygen module
14 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
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();
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 /****************************************************************************/
bool haveASchool() const
Definition: AGChild.cpp:92
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:63
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:97
bool leaveSchool()
Definition: AGChild.cpp:82
void print()
Definition: AGChild.cpp:47
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:52
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:64
AGSchool * school
Definition: AGChild.h:70
int getSchoolClosing() const
Definition: AGChild.cpp:102
int age
Definition: AGPerson.h:72
int getSchoolOpening() const
Definition: AGChild.cpp:107
Base class of every person in the city (adults and children)
Definition: AGPerson.h:49
AGChild(int age)
Definition: AGChild.h:49