Eclipse SUMO - Simulation of Urban MObility
DistributionCont.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-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
/****************************************************************************/
15
// A container for distributions
16
/****************************************************************************/
17
#ifndef DistributionCont_h
18
#define DistributionCont_h
19
20
21
// ===========================================================================
22
// included modules
23
// ===========================================================================
24
#include <
config.h
>
25
26
#include <string>
27
#include <map>
28
#include <
utils/distribution/Distribution.h
>
29
30
31
// ===========================================================================
32
// class definitions
33
// ===========================================================================
38
class
DistributionCont
{
39
public
:
41
static
bool
dictionary
(
const
std::string& type,
const
std::string&
id
,
42
Distribution
* d);
43
45
static
Distribution
*
dictionary
(
const
std::string& type,
46
const
std::string&
id
);
47
49
static
void
clear
();
50
51
private
:
53
typedef
std::map<std::string, Distribution*>
DistDict
;
54
56
typedef
std::map<std::string, DistDict>
TypedDistDict
;
57
59
static
TypedDistDict
myDict
;
60
61
};
62
63
64
#endif
65
66
/****************************************************************************/
67
DistributionCont::clear
static void clear()
delete all stored distributions
Definition:
DistributionCont.cpp:70
Distribution.h
Distribution
Definition:
Distribution.h:38
DistributionCont::dictionary
static bool dictionary(const std::string &type, const std::string &id, Distribution *d)
Adds a distribution of the given type and name to the container.
Definition:
DistributionCont.cpp:35
DistributionCont::DistDict
std::map< std::string, Distribution * > DistDict
Definition of a map from distribution ids to distributions.
Definition:
DistributionCont.h:53
DistributionCont::myDict
static TypedDistDict myDict
Map from distribution types to distribution ids to distributions.
Definition:
DistributionCont.h:59
DistributionCont
Definition:
DistributionCont.h:38
config.h
DistributionCont::TypedDistDict
std::map< std::string, DistDict > TypedDistDict
Definition of a map from distribution types to distribution ids to distributions.
Definition:
DistributionCont.h:56
src
utils
distribution
DistributionCont.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16