SUMO - Simulation of Urban MObility
OutputFormatter.h
Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Abstract base class for output formatters
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This file is part of SUMO.
00014 //   SUMO is free software: you can redistribute it and/or modify
00015 //   it under the terms of the GNU General Public License as published by
00016 //   the Free Software Foundation, either version 3 of the License, or
00017 //   (at your option) any later version.
00018 //
00019 /****************************************************************************/
00020 #ifndef OutputFormatter_h
00021 #define OutputFormatter_h
00022 
00023 
00024 // ===========================================================================
00025 // included modules
00026 // ===========================================================================
00027 #ifdef _MSC_VER
00028 #include <windows_config.h>
00029 #else
00030 #include <config.h>
00031 #endif
00032 
00033 #include <string>
00034 #include <vector>
00035 #include <utils/xml/SUMOXMLDefinitions.h>
00036 
00037 
00038 // ===========================================================================
00039 // class declarations
00040 // ===========================================================================
00041 class Boundary;
00042 class Position;
00043 class PositionVector;
00044 class RGBColor;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00058 class OutputFormatter {
00059 public:
00061     virtual ~OutputFormatter() { }
00062 
00063 
00077     virtual bool writeXMLHeader(std::ostream& into, const std::string& rootElement,
00078                         const std::string xmlParams = "",
00079                         const std::string& attrs = "",
00080                         const std::string& comment = "") = 0;
00081 
00082 
00093     virtual void openTag(std::ostream& into, const std::string& xmlElement) = 0;
00094 
00095 
00103     virtual void openTag(std::ostream& into, const SumoXMLTag& xmlElement) = 0;
00104 
00105 
00112     virtual void closeOpener(std::ostream& into) = 0;
00113 
00114 
00122     virtual bool closeTag(std::ostream& into, bool abbreviated=false) = 0;
00123 
00124 
00131     virtual void writeAttr(std::ostream& into, const std::string& attr, const std::string& val) = 0;
00132 
00133 };
00134 
00135 
00136 #endif
00137 
00138 /****************************************************************************/
00139 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines