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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // An output device that encapsulates an ofstream
19 /****************************************************************************/
20 #ifndef OutputDevice_File_h
21 #define OutputDevice_File_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <fstream>
34 #include "OutputDevice.h"
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
48 public:
53  OutputDevice_File(const std::string& fullName, const bool binary);
54 
55 
58 
59 
60 protected:
63 
67  std::ostream& getOStream();
69 
70 
71 private:
73  std::ofstream* myFileStream;
74 
75 };
76 
77 
78 #endif
79 
80 /****************************************************************************/
81 
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:70