SUMO - Simulation of Urban MObility
DistributionCont Class Reference

#include <DistributionCont.h>

Collaboration diagram for DistributionCont:
Collaboration graph

Static Public Member Functions

static void clear ()
 delete all stored distributions More...
 
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. More...
 
static Distributiondictionary (const std::string &type, const std::string &id)
 retrieves the distribution described by a type and a name from the container More...
 

Private Types

typedef std::map< std::string, Distribution * > DistDict
 Definition of a map from distribution ids to distributions. More...
 
typedef std::map< std::string, DistDictTypedDistDict
 Definition of a map from distribution types to distribution ids to distributions. More...
 

Static Private Attributes

static TypedDistDict myDict
 Map from distribution types to distribution ids to distributions. More...
 

Detailed Description

A container for distributions of different type.

Definition at line 44 of file DistributionCont.h.

Member Typedef Documentation

◆ DistDict

typedef std::map<std::string, Distribution*> DistributionCont::DistDict
private

Definition of a map from distribution ids to distributions.

Definition at line 59 of file DistributionCont.h.

◆ TypedDistDict

typedef std::map<std::string, DistDict> DistributionCont::TypedDistDict
private

Definition of a map from distribution types to distribution ids to distributions.

Definition at line 62 of file DistributionCont.h.

Member Function Documentation

◆ clear()

void DistributionCont::clear ( )
static

delete all stored distributions

Definition at line 76 of file DistributionCont.cpp.

References myDict.

Referenced by main().

◆ dictionary() [1/2]

◆ dictionary() [2/2]

Distribution * DistributionCont::dictionary ( const std::string &  type,
const std::string &  id 
)
static

retrieves the distribution described by a type and a name from the container

Definition at line 60 of file DistributionCont.cpp.

References myDict.

Field Documentation

◆ myDict

DistributionCont::TypedDistDict DistributionCont::myDict
staticprivate

Map from distribution types to distribution ids to distributions.

Definition at line 65 of file DistributionCont.h.

Referenced by clear(), and dictionary().


The documentation for this class was generated from the following files: