LCOV - code coverage report
Current view: top level - src/activitygen/city - AGChild.h (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 3 3
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) 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              : /****************************************************************************/
      16              : /// @file    AGChild.h
      17              : /// @author  Piotr Woznica
      18              : /// @author  Daniel Krajzewicz
      19              : /// @author  Walter Bamberger
      20              : /// @author  Michael Behrisch
      21              : /// @date    July 2010
      22              : ///
      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         1594 : class AGChild : public AGPerson {
      39              : public:
      40          760 :     AGChild(int age) :
      41              :         AGPerson(age),
      42          760 :         mySchool(nullptr) {};
      43              :     void print() const;
      44              :     bool setSchool(AGSchool* school);
      45              :     /**
      46              :      * @param schools: school vector from City object
      47              :      * @param housepos: Position of the households habitation
      48              :      * @return if a school was found corresponding to the child's age.
      49              :      */
      50              :     bool allocateASchool(std::list<AGSchool>* schools, AGPosition housePos);
      51              :     /**
      52              :      * @return if the child is now without any school
      53              :      */
      54              :     bool leaveSchool();
      55              :     bool haveASchool() const;
      56              :     AGPosition getSchoolLocation() const;
      57              :     int getSchoolOpening() const;
      58              :     int getSchoolClosing() const;
      59              : 
      60              : private:
      61              :     AGSchool* mySchool;
      62              : };
        

Generated by: LCOV version 2.0-1