\doxysection{Route\+Tracker.\+hpp}
\hypertarget{RouteTracker_8hpp_source}{}\label{RouteTracker_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/Loaders/RouteTracker.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/Loaders/RouteTracker.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_LOADERS\_ROUTETRACKER\_H}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_LOADERS\_ROUTETRACKER\_H}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}AShape.hpp"{}}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}Via.hpp"{}}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}Loaders/Factory.hpp"{}}}
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNet}{Net}};}
\DoxyCodeLine{00010\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPin}{Pin}};}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{keyword}{class\ }RouteTracker}
\DoxyCodeLine{00013\ \{}
\DoxyCodeLine{00014\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00015\ \ \ \ \ RouteTracker(\mbox{\hyperlink{classNet}{Net}}\&,\ \textcolor{keyword}{const}\ std::vector<WideSegment\_25>\&,\ \textcolor{keyword}{const}\ std::vector<Via>\&);}
\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordtype}{bool}\ run();}
\DoxyCodeLine{00017\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00018\ \ \ \ \ \mbox{\hyperlink{classNet}{Net}}\ \&mNet;}
\DoxyCodeLine{00019\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<WideSegment\_25>\ \&mSegs;}
\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<Via>\ \&mVias;}
\DoxyCodeLine{00021\ \ \ \ \ std::map<Point\_25,\ std::set<const\ Via\ *>>\ mPoint2Vias;}
\DoxyCodeLine{00022\ \ \ \ \ std::vector<std::list<WideSegment\_25>>\ mTracks;}
\DoxyCodeLine{00023\ \ \ \ \ std::map<Point\_2,\ std::set<uint>>\ mPoint2Tracks;}
\DoxyCodeLine{00024\ \ \ \ \ std::map<Point\_25,\ Pin\ *>\ mPt2Pin;}
\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keywordtype}{void}\ stitchTracks();}
\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keywordtype}{void}\ mergeTracks(uint\ t,\ uint\ u);}
\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keywordtype}{void}\ eraseFront(uint\ t);}
\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keywordtype}{void}\ eraseBack(uint\ t);}
\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keywordtype}{void}\ erasedFromTrack(\textcolor{keyword}{const}\ \mbox{\hyperlink{classWideSegment__25}{WideSegment\_25}}\&,\ uint\ t);}
\DoxyCodeLine{00030\ \ \ \ \ uint\ tryAppend(std::set<uint>\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classWideSegment__25}{WideSegment\_25}}\&,\ uint\ except\ =\ std::numeric\_limits<uint>::max());}
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keywordtype}{bool}\ tryAppend(uint\ track,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classWideSegment__25}{WideSegment\_25}}\&);}
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{bool}\ tryConnectTracks(uint\ t,\ uint\ u);}
\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keywordtype}{bool}\ canAddVia(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ \&v,\ \textcolor{keywordtype}{int}\ z)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00034\ \ \ \ \ \textcolor{keywordtype}{void}\ makeConnections();}
\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keywordtype}{void}\ addConnection(\mbox{\hyperlink{classPin}{Pin}}\ *,\ std::vector<WideSegment\_25>\&,\ std::vector<Via>\&,\ \mbox{\hyperlink{classPin}{Pin}}\ *);}
\DoxyCodeLine{00036\ \ \ \ \ \mbox{\hyperlink{classPin}{Pin}}\ *getPin(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\&)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00037\ \};}
\DoxyCodeLine{00038\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{classPin}{Pin}}\ *RouteTracker::getPin(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ \&v)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00039\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{auto}\ I\ =\ mPt2Pin.find(v);}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordflow}{if}\ (I\ !=\ mPt2Pin.end())}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ I-\/>second;}
\DoxyCodeLine{00043\ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{00044\ \}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_LOADERS\_ROUTETRACKER\_H}}

\end{DoxyCode}
