Eclipse SUMO - Simulation of Urban MObility
MSBitSetLogic< N > Class Template Reference

#include <MSBitSetLogic.h>

Inheritance diagram for MSBitSetLogic< N >:
[legend]
Collaboration diagram for MSBitSetLogic< N >:
[legend]

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. More...
 
typedef std::vector< std::bitset< N > > Logic
 Container that holds the right of way bitsets. Each link has its 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. More...
 

Public Member Functions

const MSLogicJunction::LinkBitsgetFoesFor (int linkIndex) const
 Returns the foes for the given link. More...
 
bool getIsCont (int linkIndex) const
 
int getLogicSize () const
 
const MSLogicJunction::LinkBitsgetResponseFor (int linkIndex) const
 Returns the response for the given link. More...
 
bool hasFoes () const
 
 MSBitSetLogic (int nLinks, const Logic &logic, const Foes &foes, std::bitset< SUMO_MAX_CONNECTIONS > conts)
 Use this constructor only. More...
 

Protected Attributes

int myNLinks
 The logic's number of links. More...
 

Static Protected Attributes

static MSLogicJunction::LinkBits myDummyFoes
 A dummy foe container. More...
 

Private Member Functions

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

Private Attributes

const std::bitset< SUMO_MAX_CONNECTIONSmyConts
 
const Foes myInternalLinksFoes
 internal lanes logic More...
 
const Logic myLogic
 junctions logic based on std::bitset More...
 

Detailed Description

template<int N>
class MSBitSetLogic< N >

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

Definition at line 41 of file MSBitSetLogic.h.

Member Typedef Documentation

◆ Foes

template<int 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 53 of file MSBitSetLogic.h.

◆ Logic

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

Container that holds the right of way bitsets. Each link has its 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 49 of file MSBitSetLogic.h.

Constructor & Destructor Documentation

◆ MSBitSetLogic() [1/2]

template<int N>
MSBitSetLogic< N >::MSBitSetLogic ( int  nLinks,
const Logic logic,
const Foes foes,
std::bitset< SUMO_MAX_CONNECTIONS conts 
)
inline

Use this constructor only.

Definition at line 58 of file MSBitSetLogic.h.

◆ MSBitSetLogic() [2/2]

template<int N>
MSBitSetLogic< N >::MSBitSetLogic ( const MSBitSetLogic< N > &  )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ getFoesFor()

template<int N>
const MSLogicJunction::LinkBits& MSBitSetLogic< N >::getFoesFor ( int  linkIndex) const
inlinevirtual

Returns the foes for the given link.

Reimplemented from MSJunctionLogic.

Definition at line 69 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myInternalLinksFoes.

◆ getIsCont()

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

Reimplemented from MSJunctionLogic.

Definition at line 73 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myConts.

◆ getLogicSize()

int MSJunctionLogic::getLogicSize ( ) const
inlineinherited

Definition at line 58 of file MSJunctionLogic.h.

References MSJunctionLogic::myNLinks.

Referenced by MSTrafficLightLogic::init(), and MSRightOfWayJunction::postloadInit().

Here is the caller graph for this function:

◆ getResponseFor()

template<int N>
const MSLogicJunction::LinkBits& MSBitSetLogic< N >::getResponseFor ( int  linkIndex) const
inlinevirtual

Returns the response for the given link.

Reimplemented from MSJunctionLogic.

Definition at line 64 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myLogic.

◆ hasFoes()

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

Reimplemented from MSJunctionLogic.

Definition at line 77 of file MSBitSetLogic.h.

References MSBitSetLogic< N >::myLogic.

◆ operator=()

template<int N>
MSBitSetLogic& MSBitSetLogic< N >::operator= ( const MSBitSetLogic< N > &  )
privatedelete

Invalidated assignment operator.

Field Documentation

◆ myConts

template<int N>
const std::bitset<SUMO_MAX_CONNECTIONS> MSBitSetLogic< N >::myConts
private

Definition at line 93 of file MSBitSetLogic.h.

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

◆ myDummyFoes

MSLogicJunction::LinkBits MSJunctionLogic::myDummyFoes
staticprotectedinherited

A dummy foe container.

Definition at line 74 of file MSJunctionLogic.h.

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

◆ myInternalLinksFoes

template<int N>
const Foes MSBitSetLogic< N >::myInternalLinksFoes
private

internal lanes logic

Definition at line 91 of file MSBitSetLogic.h.

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

◆ myLogic

template<int N>
const Logic MSBitSetLogic< N >::myLogic
private

junctions logic based on std::bitset

Definition at line 88 of file MSBitSetLogic.h.

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

◆ myNLinks

int MSJunctionLogic::myNLinks
protectedinherited

The logic's number of links.

Definition at line 71 of file MSJunctionLogic.h.

Referenced by MSJunctionLogic::getLogicSize().


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