mirror of https://github.com/KLayout/klayout.git
WIP: Bug fixes, refactoring
This commit is contained in:
parent
99887a15f0
commit
7f2200cab5
|
|
@ -44,62 +44,7 @@ class DeepShapeStore;
|
|||
class TransformationReducer;
|
||||
class EdgeFilterBase;
|
||||
|
||||
/**
|
||||
* @brief An edge pair set iterator
|
||||
*
|
||||
* The iterator delivers the edge pairs of the edge pair set
|
||||
*/
|
||||
class DB_PUBLIC EdgePairsIterator
|
||||
: public generic_shape_iterator<db::EdgePair>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
EdgePairsIterator ()
|
||||
: generic_shape_iterator<db::EdgePair> ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Constructor from a delegate
|
||||
* The iterator will take ownership over the delegate
|
||||
*/
|
||||
EdgePairsIterator (EdgePairsIteratorDelegate *delegate)
|
||||
: generic_shape_iterator<db::EdgePair> (delegate)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copy constructor and assignment
|
||||
*/
|
||||
EdgePairsIterator (const EdgePairsIterator &other)
|
||||
: generic_shape_iterator<db::EdgePair> (static_cast<const generic_shape_iterator<db::EdgePair> &> (other))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
EdgePairsIterator &operator= (const EdgePairsIterator &other)
|
||||
{
|
||||
generic_shape_iterator<db::EdgePair>::operator= (other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increment
|
||||
*/
|
||||
EdgePairsIterator &operator++ ()
|
||||
{
|
||||
generic_shape_iterator<db::EdgePair>::operator++ ();
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef generic_shape_iterator<EdgePair> EdgePairsIterator;
|
||||
typedef addressable_shape_delivery<EdgePair> AddressableEdgePairDelivery;
|
||||
|
||||
class EdgePairs;
|
||||
|
|
|
|||
|
|
@ -39,62 +39,7 @@ class MutableEdges;
|
|||
class EmptyEdges;
|
||||
class DeepShapeStore;
|
||||
|
||||
/**
|
||||
* @brief An edge set iterator
|
||||
*
|
||||
* The iterator delivers the edges of the edge set
|
||||
*/
|
||||
class DB_PUBLIC EdgesIterator
|
||||
: public generic_shape_iterator<db::Edge>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
EdgesIterator ()
|
||||
: generic_shape_iterator<db::Edge> ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Constructor from a delegate
|
||||
* The iterator will take ownership over the delegate
|
||||
*/
|
||||
EdgesIterator (EdgesIteratorDelegate *delegate)
|
||||
: generic_shape_iterator<db::Edge> (delegate)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copy constructor and assignment
|
||||
*/
|
||||
EdgesIterator (const EdgesIterator &other)
|
||||
: generic_shape_iterator<db::Edge> (static_cast<const generic_shape_iterator<db::Edge> &> (other))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
EdgesIterator &operator= (const EdgesIterator &other)
|
||||
{
|
||||
generic_shape_iterator<db::Edge>::operator= (other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increment
|
||||
*/
|
||||
EdgesIterator &operator++ ()
|
||||
{
|
||||
generic_shape_iterator<db::Edge>::operator++ ();
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef generic_shape_iterator<db::Edge> EdgesIterator;
|
||||
typedef addressable_shape_delivery<Edge> AddressableEdgeDelivery;
|
||||
|
||||
class Edges;
|
||||
|
|
|
|||
|
|
@ -431,7 +431,8 @@ const db::PropertiesRepository *FlatRegion::properties_repository () const
|
|||
|
||||
void FlatRegion::insert_into (Layout *layout, db::cell_index_type into_cell, unsigned int into_layer) const
|
||||
{
|
||||
layout->cell (into_cell).shapes (into_layer).insert (*mp_polygons);
|
||||
db::PropertyMapper pm (layout->properties_repository (), *mp_properties_repository.get_const ());
|
||||
layout->cell (into_cell).shapes (into_layer).insert (*mp_polygons, pm);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ OriginalLayerRegion::OriginalLayerRegion (const OriginalLayerRegion &other)
|
|||
OriginalLayerRegion::OriginalLayerRegion (const RecursiveShapeIterator &si, bool is_merged)
|
||||
: AsIfFlatRegion (), m_merged_polygons (false), m_iter (si)
|
||||
{
|
||||
tl_assert (si.layout ());
|
||||
init ();
|
||||
|
||||
m_is_merged = is_merged;
|
||||
|
|
@ -161,6 +162,7 @@ OriginalLayerRegion::OriginalLayerRegion (const RecursiveShapeIterator &si, bool
|
|||
OriginalLayerRegion::OriginalLayerRegion (const RecursiveShapeIterator &si, const db::ICplxTrans &trans, bool merged_semantics, bool is_merged)
|
||||
: AsIfFlatRegion (), m_merged_polygons (false), m_iter (si), m_iter_trans (trans)
|
||||
{
|
||||
tl_assert (si.layout ());
|
||||
init ();
|
||||
|
||||
m_is_merged = is_merged;
|
||||
|
|
@ -421,11 +423,12 @@ OriginalLayerRegion::insert_into (Layout *layout, db::cell_index_type into_cell,
|
|||
|
||||
db::Shapes &sh = layout->cell (into_cell).shapes (into_layer);
|
||||
|
||||
db::PropertyMapper pm (*layout, *m_iter.layout ());
|
||||
|
||||
// NOTE: if the source (r) is from the same layout than the shapes live in, we better
|
||||
// lock the layout against updates while inserting
|
||||
db::LayoutLocker locker (layout);
|
||||
for (db::RecursiveShapeIterator i = m_iter; !i.at_end (); ++i) {
|
||||
tl::ident_map<db::properties_id_type> pm;
|
||||
sh.insert (*i, i.trans (), pm);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,62 +43,7 @@ class DeepShapeStore;
|
|||
class TransformationReducer;
|
||||
class CompoundRegionOperationNode;
|
||||
|
||||
/**
|
||||
* @brief A region iterator
|
||||
*
|
||||
* The iterator delivers the polygons of the region
|
||||
*/
|
||||
class DB_PUBLIC RegionIterator
|
||||
: public generic_shape_iterator<db::Polygon>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
RegionIterator ()
|
||||
: generic_shape_iterator<db::Polygon> ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Constructor from a delegate
|
||||
* The iterator will take ownership over the delegate
|
||||
*/
|
||||
RegionIterator (RegionIteratorDelegate *delegate)
|
||||
: generic_shape_iterator<db::Polygon> (delegate)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copy constructor and assignment
|
||||
*/
|
||||
RegionIterator (const RegionIterator &other)
|
||||
: generic_shape_iterator<db::Polygon> (static_cast<const generic_shape_iterator<db::Polygon> &> (other))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
RegionIterator &operator= (const RegionIterator &other)
|
||||
{
|
||||
generic_shape_iterator<db::Polygon>::operator= (other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increment
|
||||
*/
|
||||
RegionIterator &operator++ ()
|
||||
{
|
||||
generic_shape_iterator<db::Polygon>::operator++ ();
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef generic_shape_iterator<db::Polygon> RegionIterator;
|
||||
typedef addressable_shape_delivery<db::Polygon> AddressablePolygonDelivery;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ public:
|
|||
} else {
|
||||
// translate and transform into this
|
||||
for (tl::vector<LayerBase *>::const_iterator l = d.m_layers.begin (); l != d.m_layers.end (); ++l) {
|
||||
(*l)->transform_into (this, shape_repository (), array_repository (), pm_delegate);
|
||||
(*l)->translate_into (this, shape_repository (), array_repository (), pm_delegate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,63 +43,7 @@ class Region;
|
|||
class DeepShapeStore;
|
||||
class TransformationReducer;
|
||||
|
||||
/**
|
||||
* @brief An text set iterator
|
||||
*
|
||||
* The iterator delivers the texts of the text set
|
||||
*/
|
||||
|
||||
class DB_PUBLIC TextsIterator
|
||||
: public generic_shape_iterator<db::Text>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
TextsIterator ()
|
||||
: generic_shape_iterator<db::Text> ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Constructor from a delegate
|
||||
* The iterator will take ownership over the delegate
|
||||
*/
|
||||
TextsIterator (TextsIteratorDelegate *delegate)
|
||||
: generic_shape_iterator<db::Text> (delegate)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copy constructor and assignment
|
||||
*/
|
||||
TextsIterator (const TextsIterator &other)
|
||||
: generic_shape_iterator<db::Text> (static_cast<const generic_shape_iterator<db::Text> &> (other))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
TextsIterator &operator= (const TextsIterator &other)
|
||||
{
|
||||
generic_shape_iterator<db::Text>::operator= (other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Increment
|
||||
*/
|
||||
TextsIterator &operator++ ()
|
||||
{
|
||||
generic_shape_iterator<db::Text>::operator++ ();
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef generic_shape_iterator<Text> TextsIterator;
|
||||
typedef addressable_shape_delivery<Text> AddressableTextDelivery;
|
||||
|
||||
class Texts;
|
||||
|
|
|
|||
Loading…
Reference in New Issue