Corners::copy()
This commit is contained in:
parent
5ea28c77f6
commit
f543340dfb
|
|
@ -47,6 +47,7 @@ public:
|
|||
virtual ~Corners();
|
||||
void clear();
|
||||
int count() const;
|
||||
void copy(Corners *corners);
|
||||
bool multiCorner() const;
|
||||
Corner *findCorner(const char *corner);
|
||||
Corner *findCorner(int corner_index);
|
||||
|
|
|
|||
|
|
@ -99,6 +99,30 @@ Corners::makeCorners(StringSet *corner_names)
|
|||
makeAnalysisPts();
|
||||
}
|
||||
|
||||
void
|
||||
Corners::copy(Corners *corners)
|
||||
{
|
||||
clear();
|
||||
int index = 0;
|
||||
for (Corner *orig : corners->corners_) {
|
||||
const char *name = orig->name();
|
||||
Corner *corner = new Corner(name, index);
|
||||
corners_.push_back(corner);
|
||||
// Use the copied name in the map.
|
||||
corner_map_[corner->name()] = corner;
|
||||
index++;
|
||||
}
|
||||
makeAnalysisPts();
|
||||
|
||||
parasitic_analysis_pts_.deleteContentsClear();
|
||||
for (ParasiticAnalysisPt *orig_ap : corners->parasitic_analysis_pts_) {
|
||||
ParasiticAnalysisPt *ap = new ParasiticAnalysisPt(orig_ap->name(), orig_ap->index(),
|
||||
orig_ap->minMax());
|
||||
parasitic_analysis_pts_.push_back(ap);
|
||||
}
|
||||
updateCornerParasiticAnalysisPts();
|
||||
}
|
||||
|
||||
void
|
||||
Corners::makeParasiticAnalysisPtsSingle()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue