SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSJunctionLogic.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // kinds of logic-implementations.
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef MSJunctionLogic_h
23 #define MSJunctionLogic_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <utils/common/StdDefs.h>
36 #include "MSLogicJunction.h"
37 #include <string>
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 public:
49  virtual ~MSJunctionLogic();
50 
52  unsigned int nLinks();
53 
55  virtual const MSLogicJunction::LinkFoes& getFoesFor(unsigned int linkIndex) const {
56  UNUSED_PARAMETER(linkIndex);
57  return myDummyFoes;
58  }
59 
60  virtual const std::bitset<64>& getInternalFoesFor(unsigned int linkIndex) const {
61  UNUSED_PARAMETER(linkIndex);
62  return myDummyFoes;
63  }
64  virtual bool getIsCont(unsigned int linkIndex) const {
65  UNUSED_PARAMETER(linkIndex);
66  return false;
67  }
68 
69 
70  unsigned int getLogicSize() const {
71  return myNLinks;
72  }
73 
74  virtual bool hasFoes() const {
75  return false;
76  }
77 
78 
79 
80 
81 protected:
83  MSJunctionLogic(unsigned int nLinks);
84 
86  unsigned int myNLinks;
87 
90 
91 private:
94 
97 
100 
101 };
102 
103 
104 #endif
105 
106 /****************************************************************************/
107 
unsigned int nLinks()
Returns the logic's number of links.
virtual bool getIsCont(unsigned int linkIndex) const
unsigned int getLogicSize() const
virtual const std::bitset< 64 > & getInternalFoesFor(unsigned int linkIndex) const
unsigned int myNLinks
The logic's number of links.
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:39
static MSLogicJunction::LinkFoes myDummyFoes
A dummy foe container.
virtual const MSLogicJunction::LinkFoes & getFoesFor(unsigned int linkIndex) const
Returns the foes of the given link.
virtual bool hasFoes() const
MSJunctionLogic()
Default constructor.
std::bitset< 64 > LinkFoes
Container for link foes.
MSJunctionLogic & operator=(const MSJunctionLogic &)
Assignment operator.
virtual ~MSJunctionLogic()
Destructor.