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    NILoader.h
11 /// @author  Daniel Krajzewicz
12 /// @author  Jakob Erdmann
13 /// @author  Michael Behrisch
14 /// @date    Tue, 20 Nov 2001
15 /// @version $Id$
16 ///
17 // Perfoms network import
18 /****************************************************************************/
19 #ifndef NILoader_h
20 #define NILoader_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <vector>
30 #include <xercesc/sax2/SAX2XMLReader.hpp>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class OptionsCont;
37 class SUMOSAXHandler;
38 class NBNetBuilder;
39 class Position;
40 class PositionVector;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
46 /**
47  * @class NILoader
48  * @brief Perfoms network import
49  *
50  * A plain loader which encapsulates calls to the import modules.
51  */
52 class NILoader {
53 public:
54     /** @brief Constructor
55      * @param[in] nb The network builder to fill with loaded data
56      */
57     NILoader(NBNetBuilder& nb);
58 
59 
60     /// @brief Destructor
61     ~NILoader();
62 
63 
64     /** loads data from the files specified in the given option container */
65     void load(OptionsCont& oc);
66 
67 private:
68     /** loads data from sumo-files */
69     //void loadSUMO(OptionsCont &oc);
70 
71     /** loads data from XML-files */
72     void loadXML(OptionsCont& oc);
73 
74     /** loads data from the list of xml-files of certain type */
75     void loadXMLType(SUMOSAXHandler* handler, const std::vector<std::string>& files,
76                      const std::string& type, const bool stringParse = false);
77 
78 private:
79     /// @brief The network builder to fill with loaded data
80     NBNetBuilder& myNetBuilder;
81 
82 
83 private:
84     /// @brief Invalidated copy constructor.
85     NILoader(const NILoader&);
86 
87     /// @brief Invalidated assignment operator.
88     NILoader& operator=(const NILoader&);
89 
90 
91 };
92 
93 
94 #endif
95 
96 /****************************************************************************/
97 
98