SUMO - Simulation of Urban MObility
AGSchool.h
Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Correspond to given ages and referenced by children. Has a precise location.
00010 /****************************************************************************/
00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00013 // activitygen module
00014 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00015 /****************************************************************************/
00016 //
00017 //   This file is part of SUMO.
00018 //   SUMO is free software: you can redistribute it and/or modify
00019 //   it under the terms of the GNU General Public License as published by
00020 //   the Free Software Foundation, either version 3 of the License, or
00021 //   (at your option) any later version.
00022 //
00023 /****************************************************************************/
00024 #ifndef AGSCHOOL_H
00025 #define AGSCHOOL_H
00026 
00027 
00028 // ===========================================================================
00029 // included modules
00030 // ===========================================================================
00031 #ifdef _MSC_VER
00032 #include <windows_config.h>
00033 #else
00034 #include <config.h>
00035 #endif
00036 
00037 #include <iostream>
00038 #include "AGPosition.h"
00039 
00040 
00041 // ===========================================================================
00042 // class definitions
00043 // ===========================================================================
00044 class AGSchool {
00045 public:
00046     AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close) :
00047         beginAge(beginAge),
00048         endAge(endAge),
00049         capacity(capacity_),
00050         initCapacity(capacity_),
00051         location(pos),
00052         opening(open),
00053         closing(close) {};
00054     void print();
00055     int getPlaces();
00056     bool addNewChild();
00057     bool removeChild();
00058     int getBeginAge();
00059     int getEndAge();
00060     bool acceptThisAge(int age);
00061     AGPosition getPosition();
00062     int getClosingHour();
00063     int getOpeningHour();
00064 
00065 private:
00066     int beginAge, endAge;
00067     int capacity;
00068     int initCapacity;
00069     AGPosition location;
00070     int opening, closing;
00071 };
00072 
00073 #endif
00074 
00075 /****************************************************************************/
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines