SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSBitSetLogic< N > Class Template Reference

#include <MSBitSetLogic.h>

Inheritance diagram for MSBitSetLogic< N >:
MSJunctionLogic

Public Types

typedef std::vector
< std::bitset< N > > 
Foes
 Container holding the information which internal lanes prohibt which links Build the same way as Logic.
typedef std::vector
< std::bitset< N > > 
Logic
 Container that holds the right of way bitsets. Each link has it's own bitset. The bits in the bitsets correspond to the links. To create a bitset for a particular link, set the bits to true that correspond to links that have the right of way. All others set to false, including the link's "own" link-bit.

Public Member Functions

const MSLogicJunction::LinkFoesgetFoesFor (unsigned int linkIndex) const
 Returns the foes of the given link.
const std::bitset< 64 > & getInternalFoesFor (unsigned int linkIndex) const
bool getIsCont (unsigned int linkIndex) const
unsigned int getLogicSize () const
virtual bool hasFoes () const
 MSBitSetLogic (unsigned int nLinks, Logic *logic, Foes *foes, std::bitset< 64 > conts)
 Use this constructor only.
unsigned int nLinks ()
 Returns the logic's number of links.
 ~MSBitSetLogic ()
 Destructor.

Protected Attributes

unsigned int myNLinks
 The logic's number of links.

Static Protected Attributes

static MSLogicJunction::LinkFoes myDummyFoes
 A dummy foe container.

Private Member Functions

 MSBitSetLogic (const MSBitSetLogic &)
 Invalidated copy constructor.
MSBitSetLogicoperator= (const MSBitSetLogic &)
 Invalidated assignment operator.

Private Attributes

std::bitset< 64 > myConts
FoesmyInternalLinksFoes
 internal lanes logic
LogicmyLogic
 junctions logic based on std::bitset

Detailed Description

template<size_t N>
class MSBitSetLogic< N >

N is sum of the number of links of the junction's inLanes.

Definition at line 51 of file MSBitSetLogic.h.

Member Typedef Documentation

template<size_t N>
typedef std::vector< std::bitset< N > > MSBitSetLogic< N >::Foes

Container holding the information which internal lanes prohibt which links Build the same way as Logic.

Definition at line 63 of file MSBitSetLogic.h.

template<size_t N>
typedef std::vector< std::bitset< N > > MSBitSetLogic< N >::Logic

Container that holds the right of way bitsets. Each link has it's own bitset. The bits in the bitsets correspond to the links. To create a bitset for a particular link, set the bits to true that correspond to links that have the right of way. All others set to false, including the link's "own" link-bit.

Definition at line 59 of file MSBitSetLogic.h.

Constructor & Destructor Documentation

template<size_t N>
MSBitSetLogic< N >::MSBitSetLogic ( unsigned int  nLinks,
Logic logic,
Foes foes,
std::bitset< 64 >  conts 
)
inline

Use this constructor only.

Definition at line 68 of file MSBitSetLogic.h.

template<size_t N>
MSBitSetLogic< N >::~MSBitSetLogic ( )
inline

Destructor.

Definition at line 77 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myInternalLinksFoes, and MSBitSetLogic< N >::myLogic.

template<size_t N>
MSBitSetLogic< N >::MSBitSetLogic ( const MSBitSetLogic< N > &  )
private

Invalidated copy constructor.

Member Function Documentation

template<size_t N>
const MSLogicJunction::LinkFoes& MSBitSetLogic< N >::getFoesFor ( unsigned int  linkIndex) const
inlinevirtual

Returns the foes of the given link.

Reimplemented from MSJunctionLogic.

Definition at line 84 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myLogic.

template<size_t N>
const std::bitset<64>& MSBitSetLogic< N >::getInternalFoesFor ( unsigned int  linkIndex) const
inlinevirtual

Reimplemented from MSJunctionLogic.

Definition at line 88 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myInternalLinksFoes.

template<size_t N>
bool MSBitSetLogic< N >::getIsCont ( unsigned int  linkIndex) const
inlinevirtual

Reimplemented from MSJunctionLogic.

Definition at line 92 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myConts.

unsigned int MSJunctionLogic::getLogicSize ( ) const
inlineinherited

Definition at line 70 of file MSJunctionLogic.h.

References MSJunctionLogic::myNLinks.

Referenced by MSRightOfWayJunction::postloadInit().

template<size_t N>
virtual bool MSBitSetLogic< N >::hasFoes ( ) const
inlinevirtual

Reimplemented from MSJunctionLogic.

Definition at line 96 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myLogic.

unsigned int MSJunctionLogic::nLinks ( )
inherited

Returns the logic's number of links.

Definition at line 50 of file MSJunctionLogic.cpp.

References MSJunctionLogic::myNLinks.

template<size_t N>
MSBitSetLogic& MSBitSetLogic< N >::operator= ( const MSBitSetLogic< N > &  )
private

Invalidated assignment operator.

Field Documentation

template<size_t N>
std::bitset<64> MSBitSetLogic< N >::myConts
private

Definition at line 112 of file MSBitSetLogic.h.

Referenced by MSBitSetLogic< N >::getIsCont().

MSLogicJunction::LinkFoes MSJunctionLogic::myDummyFoes
staticprotectedinherited

A dummy foe container.

Definition at line 89 of file MSJunctionLogic.h.

Referenced by MSJunctionLogic::getFoesFor(), and MSJunctionLogic::getInternalFoesFor().

template<size_t N>
Foes* MSBitSetLogic< N >::myInternalLinksFoes
private

internal lanes logic

Definition at line 110 of file MSBitSetLogic.h.

Referenced by MSBitSetLogic< N >::getInternalFoesFor(), and MSBitSetLogic< N >::~MSBitSetLogic().

template<size_t N>
Logic* MSBitSetLogic< N >::myLogic
private

junctions logic based on std::bitset

Definition at line 107 of file MSBitSetLogic.h.

Referenced by MSBitSetLogic< N >::getFoesFor(), MSBitSetLogic< N >::hasFoes(), and MSBitSetLogic< N >::~MSBitSetLogic().

unsigned int MSJunctionLogic::myNLinks
protectedinherited

The logic's number of links.

Definition at line 86 of file MSJunctionLogic.h.

Referenced by MSJunctionLogic::getLogicSize(), and MSJunctionLogic::nLinks().


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