23 #ifndef MSBitSetLogic_h
24 #define MSBitSetLogic_h
59 typedef std::vector< std::bitset< N > >
Logic;
63 typedef std::vector< std::bitset< N > >
Foes;
71 std::bitset<SUMO_MAX_CONNECTIONS> conts)
98 for (
typename Logic::const_iterator i =
myLogic->begin(); i !=
myLogic->end(); ++i) {
virtual bool hasFoes() const
Logic * myLogic
junctions logic based on std::bitset
MSBitSetLogic(int nLinks, Logic *logic, Foes *foes, std::bitset< SUMO_MAX_CONNECTIONS > conts)
Use this constructor only.
bool getIsCont(int linkIndex) const
MSBitSetLogic< SUMO_MAX_CONNECTIONS > MSBitsetLogic
const MSLogicJunction::LinkBits & getFoesFor(int linkIndex) const
Returns the foes for the given link.
~MSBitSetLogic()
Destructor.
MSBitSetLogic & operator=(const MSBitSetLogic &)
Invalidated assignment operator.
int nLinks()
Returns the logic's number of links.
std::vector< std::bitset< N > > Foes
Container holding the information which internal lanes prohibt which links Build the same way as Logi...
std::bitset< SUMO_MAX_CONNECTIONS > myConts
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...
Foes * myInternalLinksFoes
internal lanes logic
const MSLogicJunction::LinkBits & getResponseFor(int linkIndex) const
Returns the response for the given link.
std::bitset< SUMO_MAX_CONNECTIONS > LinkBits
Container for link response and foes.