/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2004-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file OutputDevice_CERR.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date 200417///18// An output device that encapsulates cerr19/****************************************************************************/20#pragma once21#include <config.h>2223#include "OutputDevice.h"242526// ===========================================================================27// class definitions28// ===========================================================================29/**30* @class OutputDevice_CERR31* @brief An output device that encapsulates cerr32*/33class OutputDevice_CERR : public OutputDevice {34public:35/** @brief Returns the single cerr instance36*37* Creates and returns the cerr device.38*/39static OutputDevice* getDevice();404142protected:43/// @name Methods that override/implement OutputDevice-methods44/// @{4546/** @brief Returns the associated ostream47* @return cerr48*/49std::ostream& getOStream();505152/** @brief Called after every write access.53*54* Calls flush on stderr.55*/56virtual void postWriteHook();57/// @}585960private:61/** @brief Constructor62* @exception IOError Should not be thrown by this implementation63*/64OutputDevice_CERR();656667/// @brief Destructor68~OutputDevice_CERR();697071private:72/// @brief my singular instance73static OutputDevice* myInstance;747576};777879