LCOV - code coverage report
Current view: top level - src/activitygen/city - AGSchool.h (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 9 9
Test Date: 2024-11-22 15:46:21 Functions: - 0 0

            Line data    Source code
       1              : /****************************************************************************/
       2              : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3              : // Copyright (C) 2001-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              : /****************************************************************************/
      16              : /// @file    AGSchool.h
      17              : /// @author  Piotr Woznica
      18              : /// @author  Daniel Krajzewicz
      19              : /// @author  Walter Bamberger
      20              : /// @date    July 2010
      21              : ///
      22              : // Correspond to given ages and referenced by children. Has a precise location.
      23              : /****************************************************************************/
      24              : #pragma once
      25              : #include <config.h>
      26              : 
      27              : #include <iostream>
      28              : #include "AGPosition.h"
      29              : 
      30              : 
      31              : // ===========================================================================
      32              : // class definitions
      33              : // ===========================================================================
      34           12 : class AGSchool {
      35              : public:
      36           12 :     AGSchool(int capacity_, AGPosition pos, int beginAge, int endAge, int open, int close) :
      37           12 :         beginAge(beginAge),
      38           12 :         endAge(endAge),
      39           12 :         capacity(capacity_),
      40           12 :         initCapacity(capacity_),
      41           12 :         location(pos),
      42           12 :         opening(open),
      43           12 :         closing(close) {};
      44              :     void print() const;
      45              :     int getPlaces();
      46              :     bool addNewChild();
      47              :     bool removeChild();
      48              :     int getBeginAge();
      49              :     int getEndAge();
      50              :     bool acceptThisAge(int age);
      51              :     AGPosition getPosition();
      52              :     int getClosingHour();
      53              :     int getOpeningHour();
      54              : 
      55              : private:
      56              :     int beginAge, endAge;
      57              :     int capacity;
      58              :     int initCapacity;
      59              :     AGPosition location;
      60              :     int opening, closing;
      61              : };
        

Generated by: LCOV version 2.0-1