1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 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 /****************************************************************************/
10 /// @file    NWFrame.h
11 /// @author  Daniel Krajzewicz
12 /// @author  Jakob Erdmann
13 /// @author  Michael Behrisch
14 /// @date    Tue, 20 Nov 2001
15 /// @version $Id$
16 ///
17 // Sets and checks options for netwrite
18 /****************************************************************************/
19 #ifndef NWFrame_h
20 #define NWFrame_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class OptionsCont;
33 class NBNetBuilder;
34 class Position;
35 class OutputDevice;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
41 /**
42  * @class NWFrame
43  * @brief Sets and checks options for netwrite; saves the network
44  */
45 class NWFrame {
46 public:
47     /// @brief Inserts options used by the network writer
48     static void fillOptions(bool forNetgen);
49 
50     /** @brief Checks set options from the OptionsCont-singleton for being valid
51      * @return Whether needed options are set and have proper values
52      */
53     static bool checkOptions();
54 
55     /// @brief Writes the network stored in the given net builder
56     static void writeNetwork(const OptionsCont& oc, NBNetBuilder& nb);
57 
58     /// @brief Writes the given position to device in long format (one attribute per dimension)
59     static void writePositionLong(const Position& pos, OutputDevice& dev);
60 
61     /// @brief The version number for written files
62     static const std::string MAJOR_VERSION;
63 };
64 
65 
66 #endif
67 
68 /****************************************************************************/
69 
70