SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OutputFormatter.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Abstract base class for output formatters
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef OutputFormatter_h
21 #define OutputFormatter_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 <string>
34 #include <vector>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class Boundary;
42 class Position;
43 class PositionVector;
44 class RGBColor;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
59 public:
61  virtual ~OutputFormatter() { }
62 
63 
76  virtual bool writeXMLHeader(std::ostream& into, const std::string& rootElement,
77  const std::string& attrs = "",
78  const std::string& comment = "") = 0;
79 
80 
91  virtual void openTag(std::ostream& into, const std::string& xmlElement) = 0;
92 
93 
101  virtual void openTag(std::ostream& into, const SumoXMLTag& xmlElement) = 0;
102 
103 
110  virtual bool closeTag(std::ostream& into) = 0;
111 
112 
113 };
114 
115 
116 #endif
117 
118 /****************************************************************************/
119 
SumoXMLTag
Numbers representing SUMO-XML - element names.
virtual bool closeTag(std::ostream &into)=0
Closes the most recently opened tag.
Abstract base class for output formatters.
virtual ~OutputFormatter()
Destructor.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
virtual void openTag(std::ostream &into, const std::string &xmlElement)=0
Opens an XML tag.
virtual bool writeXMLHeader(std::ostream &into, const std::string &rootElement, const std::string &attrs="", const std::string &comment="")=0
Writes an XML header with optional configuration.