/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGCar.cpp16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @author Michael Behrisch20/// @date July 201021///22// Cars owned by people of the city: included in households.23/****************************************************************************/24#include <config.h>2526#include <iostream>27#include <sstream>28#include <string>29#include "AGCar.h"30#include "AGAdult.h"313233// ===========================================================================34// method definitions35// ===========================================================================36std::string37AGCar::createName(int idHH, int idCar) {38std::ostringstream os;39os << "h" << idHH << "c" << idCar;40return os.str();41}4243bool44AGCar::associateTo(AGAdult* pers) {45if (currentUser == nullptr) {46currentUser = pers;47return true;48}49return false;50}5152bool53AGCar::isAssociated() const {54return (currentUser != nullptr);55}5657std::string58AGCar::getName() const {59return idName;60}616263/****************************************************************************/646566