NGNet.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NGNet_h
00020 #define NGNet_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include "NGEdge.h"
00033 #include "NGNode.h"
00034
00035
00036
00037
00038
00039 class NBNetBuilder;
00040
00041
00042
00043
00044
00053 class NGNet {
00054 public:
00056 NGNet(NBNetBuilder &nb) throw();
00057
00058
00060 ~NGNet() throw();
00061
00062
00072 NGNode* findNode(int xPos, int yPos) throw();
00073
00074
00082 std::string getNextFreeID() throw();
00083
00084
00091 SUMOReal radialToX(SUMOReal radius, SUMOReal phi) throw();
00092
00093
00100 SUMOReal radialToY(SUMOReal radius, SUMOReal phi) throw();
00101
00102
00119 void createChequerBoard(int numX, int numY, SUMOReal spaceX, SUMOReal spaceY, SUMOReal attachLength) throw();
00120
00121
00139 void createSpiderWeb(int numRadDiv, int numCircles, SUMOReal spaceRad, bool hasCenter) throw();
00140
00141
00159 void toNB() const throw(ProcessError);
00160
00161
00168 void add(NGNode *node) throw();
00169
00170
00177 void add(NGEdge *edge) throw();
00178
00179
00184 size_t nodeNo() const throw();
00185
00186
00187 private:
00196 void connect(NGNode *node1, NGNode *node2) throw();
00197
00198
00199 private:
00201 int myLastID;
00202
00204 NBNetBuilder &myNetBuilder;
00205
00207 NGNodeList myNodeList;
00208
00210 NGEdgeList myEdgeList;
00211
00212 private:
00214 NGNet(const NGNet&);
00215
00217 NGNet& operator=(const NGNet&);
00218
00219 };
00220
00221
00222 #endif
00223
00224
00225