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.dev/sumo
3 // Copyright (C) 2010-2024 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 are made available under the
7 // terms of the Eclipse Public License 2.0 which is available at
8 // https://www.eclipse.org/legal/epl-2.0/
9 // This Source Code may also be made available under the following Secondary
10 // Licenses when the conditions for such availability set forth in the Eclipse
11 // Public License 2.0 are satisfied: GNU General Public License, version 2
12 // or later which is available at
13 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15 /****************************************************************************/
23 // Person in age to go to school: linked to a school object
24 /****************************************************************************/
25 #pragma once
26 #include <config.h>
27 
28 #include <iostream>
29 #include <vector>
30 #include "AGPerson.h"
31 #include "AGPosition.h"
32 #include "AGSchool.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
38 class AGChild : public AGPerson {
39 public:
40  AGChild(int age) :
41  AGPerson(age),
42  mySchool(nullptr) {};
43  void print() const;
44  bool setSchool(AGSchool* school);
50  bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
54  bool leaveSchool();
55  bool haveASchool() const;
57  int getSchoolOpening() const;
58  int getSchoolClosing() const;
59 
60 private:
62 };
bool haveASchool() const
Definition: AGChild.cpp:84
AGSchool * mySchool
Definition: AGChild.h:61
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
Definition: AGChild.cpp:56
AGChild(int age)
Definition: AGChild.h:40
bool setSchool(AGSchool *school)
Definition: AGChild.cpp:44
bool leaveSchool()
Definition: AGChild.cpp:74
int getSchoolOpening() const
Definition: AGChild.cpp:99
AGPosition getSchoolLocation() const
Definition: AGChild.cpp:89
void print() const
Puts out a summary of the class properties.
Definition: AGChild.cpp:39
int getSchoolClosing() const
Definition: AGChild.cpp:94
Base class of every person in the city (adults and children)
Definition: AGPerson.h:39
int age
Definition: AGPerson.h:62
A location in the 2D plane freely positioned on a street.
Definition: AGPosition.h:53