SUMO - Simulation of Urban MObility
OutputDevice_File.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2004-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // An output device that encapsulates an ofstream
17 /****************************************************************************/
18 #ifndef OutputDevice_File_h
19 #define OutputDevice_File_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <fstream>
28 #include "OutputDevice.h"
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
42 public:
47  OutputDevice_File(const std::string& fullName, const bool binary);
48 
49 
52 
53 
54 protected:
57 
61  std::ostream& getOStream();
63 
64 
65 private:
67  std::ofstream* myFileStream;
68 
69 };
70 
71 
72 #endif
73 
74 /****************************************************************************/
75 
std::ostream & getOStream()
Returns the associated ostream.
std::ofstream * myFileStream
The wrapped ofstream.
An output device that encapsulates an ofstream.
~OutputDevice_File()
Destructor.
OutputDevice_File(const std::string &fullName, const bool binary)
Constructor.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64