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 PCLoaderVisum.h 11 /// @author Daniel Krajzewicz 12 /// @author Michael Behrisch 13 /// @date Thu, 02.11.2006 14 /// @version $Id$ 15 /// 16 // A reader of pois and polygons stored in VISUM-format 17 /****************************************************************************/ 18 #ifndef PCLoaderVisum_h 19 #define PCLoaderVisum_h 20 21 22 // =========================================================================== 23 // included modules 24 // =========================================================================== 25 #include <config.h> 26 27 #include <string> 28 #include "PCPolyContainer.h" 29 #include "PCTypeMap.h" 30 31 32 // =========================================================================== 33 // class definitions 34 // =========================================================================== 35 class OptionsCont; 36 37 38 // =========================================================================== 39 // class declarations 40 // =========================================================================== 41 /** 42 * @class PCLoaderVisum 43 * @brief A reader of pois and polygons stored in VISUM-format 44 */ 45 class PCLoaderVisum { 46 public: 47 /** @brief Loads pois/polygons assumed to be stored using VISUM-format 48 * 49 * If the option "visum-files" is set within the given options container, 50 * the files stored herein are parsed using "load", assuming this 51 * option contains file paths to files containing pois and polygons stored 52 * in VISUM ".net"-format. 53 * 54 * @param[in] oc The options container to get further options from 55 * @param[in] toFill The poly/pois container to add loaded polys/pois to 56 * @param[in] tm The type map to use for setting values of loaded polys/pois 57 * @exception ProcessError if something fails 58 */ 59 static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill, 60 PCTypeMap& tm); 61 62 63 protected: 64 /** @brief Parses pois/polys stored within the given file 65 * @param[in] oc The options container to get further options from 66 * @param[in] toFill The poly/pois container to add loaded polys/pois to 67 * @param[in] tm The type map to use for setting values of loaded polys/pois 68 * @exception ProcessError if something fails 69 */ 70 static void load(const std::string& file, OptionsCont& oc, PCPolyContainer& toFill, 71 PCTypeMap& tm); 72 73 74 }; 75 76 77 #endif 78 79 /****************************************************************************/ 80 81