SUMO - Simulation of Urban MObility
GUIGlObject_AbstractAdd.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Base class for additional objects (detectors etc.)
20 /****************************************************************************/
21 #ifndef GUIGlObject_AbstractAdd_h
22 #define GUIGlObject_AbstractAdd_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include "GUIGlObjectTypes.h"
35 #include "GUIGlObject.h"
36 #include <vector>
37 #include <map>
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47  public GUIGlObject {
48 public:
50  const std::string& prefix,
51  GUIGlObjectType type,
52  const std::string& id);
53 
55 
57  static void clearDictionary();
58 
60  static GUIGlObject_AbstractAdd* get(const std::string& name);
61 
63  static void remove(GUIGlObject_AbstractAdd* o);
64 
66  static const std::vector<GUIGlObject_AbstractAdd*>& getObjectList();
67 
69  static std::vector<GUIGlID> getIDList(int typeFilter);
70 
71 
72 protected:
74  static std::map<std::string, GUIGlObject_AbstractAdd*> myObjects;
75 
77  static std::vector<GUIGlObject_AbstractAdd*> myObjectList;
78 
79 };
80 
81 
82 #endif
83 
84 /****************************************************************************/
85 
static std::map< std::string, GUIGlObject_AbstractAdd * > myObjects
Map from names of loaded additional objects to the objects themselves.
GUIGlObjectType
GUIGlObject_AbstractAdd(const std::string &prefix, GUIGlObjectType type, const std::string &id)
static std::vector< GUIGlObject_AbstractAdd * > myObjectList
The list of all addtional objects currently loaded.
static void clearDictionary()
Clears the dictionary (the objects will not be deleted)
static const std::vector< GUIGlObject_AbstractAdd * > & getObjectList()
Returns the list of all additional objects.
static std::vector< GUIGlID > getIDList(int typeFilter)
Returns the list of gl-ids of all additional objects that match the given type.