Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netwrite/NWFrame.h
169665 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file NWFrame.h
15
/// @author Daniel Krajzewicz
16
/// @author Jakob Erdmann
17
/// @author Michael Behrisch
18
/// @date Tue, 20 Nov 2001
19
///
20
// Sets and checks options for netwrite
21
/****************************************************************************/
22
#pragma once
23
#include <config.h>
24
25
26
// ===========================================================================
27
// class declarations
28
// ===========================================================================
29
30
class OptionsCont;
31
class NBNetBuilder;
32
class Position;
33
class OutputDevice;
34
35
// ===========================================================================
36
// class definitions
37
// ===========================================================================
38
/**
39
* @class NWFrame
40
* @brief Sets and checks options for netwrite; saves the network
41
*/
42
class NWFrame {
43
44
public:
45
/// @brief Inserts options used by the network writer
46
static void fillOptions(OptionsCont& oc, bool forNetgen);
47
48
/** @brief Checks set options for being valid
49
* @return Whether needed options are set and have proper values
50
*/
51
static bool checkOptions(OptionsCont& oc);
52
53
/// @brief Writes the network stored in the given net builder
54
static void writeNetwork(const OptionsCont& oc, NBNetBuilder& nb);
55
56
/// @brief Writes the given position to device in long format (one attribute per dimension)
57
static void writePositionLong(const Position& pos, OutputDevice& dev);
58
};
59
60