Eclipse 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-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 // Person in age to go to school: linked to a school object
20 /****************************************************************************/
21 #ifndef AGCHILD_H
22 #define AGCHILD_H
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #include <config.h>
29 
30 #include <iostream>
31 #include <vector>
32 #include "AGPerson.h"
33 #include "AGPosition.h"
34 #include "AGSchool.h"
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
40 class AGChild : public AGPerson {
41 public:
42  AGChild(int age) :
43  AGPerson(age),
44  school(NULL) {};
45  void print() const;
46  bool setSchool(AGSchool* school);
52  bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
56  bool leaveSchool();
57  bool haveASchool() const;
59  int getSchoolOpening() const;
60  int getSchoolClosing() const;
61 
62 private:
64 };
65 
66 #endif
67 
68 /****************************************************************************/
AGChild::setSchool
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:45
AGChild::allocateASchool
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:57
AGChild::leaveSchool
bool leaveSchool()
Definition: AGChild.cpp:75
AGChild::print
void print() const
Puts out a summary of the class properties.
Definition: AGChild.cpp:40
AGSchool
Definition: AGSchool.h:36
AGPerson.h
AGChild::AGChild
AGChild(int age)
Definition: AGChild.h:42
AGChild::getSchoolOpening
int getSchoolOpening() const
Definition: AGChild.cpp:100
AGSchool.h
AGChild
Definition: AGChild.h:40
AGChild::school
AGSchool * school
Definition: AGChild.h:63
AGPerson
Base class of every person in the city (adults and children)
Definition: AGPerson.h:41
AGChild::haveASchool
bool haveASchool() const
Definition: AGChild.cpp:85
AGPosition.h
AGPosition
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:55
AGPerson::age
int age
Definition: AGPerson.h:64
AGChild::getSchoolLocation
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:90
config.h
AGChild::getSchoolClosing
int getSchoolClosing() const
Definition: AGChild.cpp:95