mirror of https://github.com/KLayout/klayout.git
Deep mode: avoid flattening by FlatRegion/FlatEdges poisoning
This commit is contained in:
parent
6df333a05e
commit
abd96c8400
|
|
@ -50,7 +50,10 @@ SOURCES = \
|
|||
dbManager.cc \
|
||||
dbMatrix.cc \
|
||||
dbMemStatistics.cc \
|
||||
dbMutableEdgePairs.cc \
|
||||
dbMutableEdges.cc \
|
||||
dbMutableRegion.cc \
|
||||
dbMutableTexts.cc \
|
||||
dbObject.cc \
|
||||
dbPath.cc \
|
||||
dbPCellDeclaration.cc \
|
||||
|
|
@ -259,7 +262,10 @@ HEADERS = \
|
|||
dbMatrix.h \
|
||||
dbMemStatistics.h \
|
||||
dbMetaInfo.h \
|
||||
dbMutableEdgePairs.h \
|
||||
dbMutableEdges.h \
|
||||
dbMutableRegion.h \
|
||||
dbMutableTexts.h \
|
||||
dbObject.h \
|
||||
dbObjectTag.h \
|
||||
dbObjectWithProperties.h \
|
||||
|
|
|
|||
|
|
@ -112,31 +112,31 @@ private:
|
|||
|
||||
|
||||
DeepEdgePairs::DeepEdgePairs ()
|
||||
: AsIfFlatEdgePairs ()
|
||||
: MutableEdgePairs ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
DeepEdgePairs::DeepEdgePairs (const RecursiveShapeIterator &si, DeepShapeStore &dss)
|
||||
: AsIfFlatEdgePairs ()
|
||||
: MutableEdgePairs ()
|
||||
{
|
||||
set_deep_layer (dss.create_edge_pair_layer (si));
|
||||
}
|
||||
|
||||
DeepEdgePairs::DeepEdgePairs (const RecursiveShapeIterator &si, DeepShapeStore &dss, const db::ICplxTrans &trans)
|
||||
: AsIfFlatEdgePairs ()
|
||||
: MutableEdgePairs ()
|
||||
{
|
||||
set_deep_layer (dss.create_edge_pair_layer (si, trans));
|
||||
}
|
||||
|
||||
DeepEdgePairs::DeepEdgePairs (const DeepEdgePairs &other)
|
||||
: AsIfFlatEdgePairs (other), db::DeepShapeCollectionDelegateBase (other)
|
||||
: MutableEdgePairs (other), db::DeepShapeCollectionDelegateBase (other)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
DeepEdgePairs::DeepEdgePairs (const DeepLayer &dl)
|
||||
: AsIfFlatEdgePairs ()
|
||||
: MutableEdgePairs ()
|
||||
{
|
||||
set_deep_layer (dl);
|
||||
}
|
||||
|
|
@ -151,6 +151,74 @@ EdgePairsDelegate *DeepEdgePairs::clone () const
|
|||
return new DeepEdgePairs (*this);
|
||||
}
|
||||
|
||||
void DeepEdgePairs::do_insert (const db::EdgePair &edge_pair)
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
top_cell.shapes (deep_layer ().layer ()).insert (edge_pair);
|
||||
}
|
||||
|
||||
invalidate_bbox ();
|
||||
set_is_merged (false);
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
static void transform_deep_layer (db::DeepLayer &deep_layer, const Trans &t)
|
||||
{
|
||||
// TODO: this is a pretty cheap implementation. At least a plain move can be done with orientation variants.
|
||||
|
||||
db::Layout &layout = deep_layer.layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer.layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ().transformed (t));
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer.layer ());
|
||||
top_cell.shapes (deep_layer.layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DeepEdgePairs::do_transform (const db::Trans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepEdgePairs::do_transform (const db::ICplxTrans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepEdgePairs::reserve (size_t)
|
||||
{
|
||||
// Not implemented for deep regions
|
||||
}
|
||||
|
||||
void DeepEdgePairs::flatten ()
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer ().layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ());
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer ().layer ());
|
||||
top_cell.shapes (deep_layer ().layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
EdgePairsIteratorDelegate *DeepEdgePairs::begin () const
|
||||
{
|
||||
return new DeepEdgePairsIterator (begin_iter ().first);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdgePairs.h"
|
||||
#include "dbMutableEdgePairs.h"
|
||||
#include "dbDeepShapeStore.h"
|
||||
#include "dbEdgePairs.h"
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ namespace db {
|
|||
* @brief Provides hierarchical edges implementation
|
||||
*/
|
||||
class DB_PUBLIC DeepEdgePairs
|
||||
: public db::AsIfFlatEdgePairs, public db::DeepShapeCollectionDelegateBase
|
||||
: public db::MutableEdgePairs, public db::DeepShapeCollectionDelegateBase
|
||||
{
|
||||
public:
|
||||
DeepEdgePairs ();
|
||||
|
|
@ -50,6 +50,15 @@ public:
|
|||
|
||||
EdgePairsDelegate *clone () const;
|
||||
|
||||
virtual void do_insert (const db::EdgePair &edge_pair);
|
||||
|
||||
virtual void do_transform (const db::Trans &t);
|
||||
virtual void do_transform (const db::ICplxTrans &t);
|
||||
|
||||
virtual void flatten ();
|
||||
|
||||
virtual void reserve (size_t n);
|
||||
|
||||
virtual EdgePairsIteratorDelegate *begin () const;
|
||||
virtual std::pair<db::RecursiveShapeIterator, db::ICplxTrans> begin_iter () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -123,14 +123,14 @@ private:
|
|||
// DeepEdges implementation
|
||||
|
||||
DeepEdges::DeepEdges (const RecursiveShapeIterator &si, DeepShapeStore &dss, bool as_edges)
|
||||
: AsIfFlatEdges (), m_merged_edges ()
|
||||
: MutableEdges (), m_merged_edges ()
|
||||
{
|
||||
set_deep_layer (dss.create_edge_layer (si, as_edges));
|
||||
init ();
|
||||
}
|
||||
|
||||
DeepEdges::DeepEdges (const RecursiveShapeIterator &si, DeepShapeStore &dss, const db::ICplxTrans &trans, bool as_edges, bool merged_semantics)
|
||||
: AsIfFlatEdges (), m_merged_edges ()
|
||||
: MutableEdges (), m_merged_edges ()
|
||||
{
|
||||
set_deep_layer (dss.create_edge_layer (si, as_edges, trans));
|
||||
init ();
|
||||
|
|
@ -138,7 +138,7 @@ DeepEdges::DeepEdges (const RecursiveShapeIterator &si, DeepShapeStore &dss, con
|
|||
}
|
||||
|
||||
DeepEdges::DeepEdges (const db::Edges &other, DeepShapeStore &dss)
|
||||
: AsIfFlatEdges (), m_merged_edges ()
|
||||
: MutableEdges (), m_merged_edges ()
|
||||
{
|
||||
set_deep_layer (dss.create_from_flat (other));
|
||||
|
||||
|
|
@ -147,13 +147,13 @@ DeepEdges::DeepEdges (const db::Edges &other, DeepShapeStore &dss)
|
|||
}
|
||||
|
||||
DeepEdges::DeepEdges ()
|
||||
: AsIfFlatEdges ()
|
||||
: MutableEdges ()
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
||||
DeepEdges::DeepEdges (const DeepLayer &dl)
|
||||
: AsIfFlatEdges ()
|
||||
: MutableEdges ()
|
||||
{
|
||||
set_deep_layer (dl);
|
||||
init ();
|
||||
|
|
@ -165,7 +165,7 @@ DeepEdges::~DeepEdges ()
|
|||
}
|
||||
|
||||
DeepEdges::DeepEdges (const DeepEdges &other)
|
||||
: AsIfFlatEdges (other), DeepShapeCollectionDelegateBase (other),
|
||||
: MutableEdges (other), DeepShapeCollectionDelegateBase (other),
|
||||
m_merged_edges_valid (other.m_merged_edges_valid),
|
||||
m_is_merged (other.m_is_merged)
|
||||
{
|
||||
|
|
@ -211,6 +211,74 @@ void DeepEdges::merged_semantics_changed ()
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void DeepEdges::do_insert (const db::Edge &edge)
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
top_cell.shapes (deep_layer ().layer ()).insert (edge);
|
||||
}
|
||||
|
||||
invalidate_bbox ();
|
||||
set_is_merged (false);
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
static void transform_deep_layer (db::DeepLayer &deep_layer, const Trans &t)
|
||||
{
|
||||
// TODO: this is a pretty cheap implementation. At least a plain move can be done with orientation variants.
|
||||
|
||||
db::Layout &layout = deep_layer.layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer.layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ().transformed (t));
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer.layer ());
|
||||
top_cell.shapes (deep_layer.layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DeepEdges::do_transform (const db::Trans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepEdges::do_transform (const db::ICplxTrans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepEdges::reserve (size_t)
|
||||
{
|
||||
// Not implemented for deep regions
|
||||
}
|
||||
|
||||
void DeepEdges::flatten ()
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer ().layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ());
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer ().layer ());
|
||||
top_cell.shapes (deep_layer ().layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
EdgesIteratorDelegate *
|
||||
DeepEdges::begin () const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdges.h"
|
||||
#include "dbMutableEdges.h"
|
||||
#include "dbDeepShapeStore.h"
|
||||
#include "dbEdgeBoolean.h"
|
||||
#include "dbEdgePairs.h"
|
||||
|
|
@ -40,7 +40,7 @@ class DeepRegion;
|
|||
* @brief Provides hierarchical edges implementation
|
||||
*/
|
||||
class DB_PUBLIC DeepEdges
|
||||
: public db::AsIfFlatEdges, public db::DeepShapeCollectionDelegateBase
|
||||
: public db::MutableEdges, public db::DeepShapeCollectionDelegateBase
|
||||
{
|
||||
public:
|
||||
DeepEdges ();
|
||||
|
|
@ -53,6 +53,15 @@ public:
|
|||
|
||||
virtual ~DeepEdges ();
|
||||
|
||||
virtual void do_transform (const db::Trans &t);
|
||||
virtual void do_transform (const db::ICplxTrans &t);
|
||||
|
||||
virtual void flatten ();
|
||||
|
||||
virtual void reserve (size_t n);
|
||||
|
||||
virtual void do_insert (const db::Edge &edge);
|
||||
|
||||
EdgesDelegate *clone () const;
|
||||
|
||||
virtual EdgesIteratorDelegate *begin () const;
|
||||
|
|
|
|||
|
|
@ -116,31 +116,31 @@ private:
|
|||
};
|
||||
|
||||
DeepTexts::DeepTexts ()
|
||||
: AsIfFlatTexts ()
|
||||
: MutableTexts ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
DeepTexts::DeepTexts (const db::Texts &other, DeepShapeStore &dss)
|
||||
: AsIfFlatTexts ()
|
||||
: MutableTexts ()
|
||||
{
|
||||
set_deep_layer (dss.create_from_flat (other));
|
||||
}
|
||||
|
||||
DeepTexts::DeepTexts (const RecursiveShapeIterator &si, DeepShapeStore &dss)
|
||||
: AsIfFlatTexts ()
|
||||
: MutableTexts ()
|
||||
{
|
||||
set_deep_layer (dss.create_text_layer (si));
|
||||
}
|
||||
|
||||
DeepTexts::DeepTexts (const RecursiveShapeIterator &si, DeepShapeStore &dss, const db::ICplxTrans &trans)
|
||||
: AsIfFlatTexts ()
|
||||
: MutableTexts ()
|
||||
{
|
||||
set_deep_layer (dss.create_text_layer (si, trans));
|
||||
}
|
||||
|
||||
DeepTexts::DeepTexts (const DeepTexts &other)
|
||||
: AsIfFlatTexts (other), DeepShapeCollectionDelegateBase (other)
|
||||
: MutableTexts (other), DeepShapeCollectionDelegateBase (other)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ DeepTexts::operator= (const DeepTexts &other)
|
|||
}
|
||||
|
||||
DeepTexts::DeepTexts (const DeepLayer &dl)
|
||||
: AsIfFlatTexts ()
|
||||
: MutableTexts ()
|
||||
{
|
||||
set_deep_layer (dl);
|
||||
}
|
||||
|
|
@ -171,6 +171,74 @@ TextsDelegate *DeepTexts::clone () const
|
|||
return new DeepTexts (*this);
|
||||
}
|
||||
|
||||
void DeepTexts::do_insert (const db::Text &text)
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
top_cell.shapes (deep_layer ().layer ()).insert (db::TextRef (text, layout.shape_repository ()));
|
||||
}
|
||||
|
||||
invalidate_bbox ();
|
||||
set_is_merged (false);
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
static void transform_deep_layer (db::DeepLayer &deep_layer, const Trans &t)
|
||||
{
|
||||
// TODO: this is a pretty cheap implementation. At least a plain move can be done with orientation variants.
|
||||
|
||||
db::Layout &layout = deep_layer.layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer.layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ().transformed (t));
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer.layer ());
|
||||
top_cell.shapes (deep_layer.layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DeepTexts::do_transform (const db::Trans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepTexts::do_transform (const db::ICplxTrans &t)
|
||||
{
|
||||
transform_deep_layer (deep_layer (), t);
|
||||
invalidate_bbox ();
|
||||
}
|
||||
|
||||
void DeepTexts::reserve (size_t)
|
||||
{
|
||||
// Not implemented for deep regions
|
||||
}
|
||||
|
||||
void DeepTexts::flatten ()
|
||||
{
|
||||
db::Layout &layout = deep_layer ().layout ();
|
||||
if (layout.begin_top_down () != layout.end_top_down ()) {
|
||||
|
||||
db::Cell &top_cell = layout.cell (*layout.begin_top_down ());
|
||||
|
||||
db::Shapes flat_shapes;
|
||||
for (db::RecursiveShapeIterator iter (layout, top_cell, deep_layer ().layer ()); !iter.at_end (); ++iter) {
|
||||
flat_shapes.insert (iter->polygon ());
|
||||
}
|
||||
|
||||
layout.clear_layer (deep_layer ().layer ());
|
||||
top_cell.shapes (deep_layer ().layer ()).swap (flat_shapes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
TextsIteratorDelegate *DeepTexts::begin () const
|
||||
{
|
||||
return new DeepTextsIterator (begin_iter ().first);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatTexts.h"
|
||||
#include "dbMutableTexts.h"
|
||||
#include "dbDeepShapeStore.h"
|
||||
#include "dbTexts.h"
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ namespace db {
|
|||
* @brief Provides hierarchical edges implementation
|
||||
*/
|
||||
class DB_PUBLIC DeepTexts
|
||||
: public db::AsIfFlatTexts, public db::DeepShapeCollectionDelegateBase
|
||||
: public db::MutableTexts, public db::DeepShapeCollectionDelegateBase
|
||||
{
|
||||
public:
|
||||
DeepTexts ();
|
||||
|
|
@ -51,6 +51,15 @@ public:
|
|||
|
||||
TextsDelegate *clone () const;
|
||||
|
||||
virtual void do_insert (const db::Text &text);
|
||||
|
||||
virtual void do_transform (const db::Trans &t);
|
||||
virtual void do_transform (const db::ICplxTrans &t);
|
||||
|
||||
virtual void flatten ();
|
||||
|
||||
virtual void reserve (size_t n);
|
||||
|
||||
virtual TextsIteratorDelegate *begin () const;
|
||||
virtual std::pair<db::RecursiveShapeIterator, db::ICplxTrans> begin_iter () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,20 +93,20 @@ EdgePairs::EdgePairs (const RecursiveShapeIterator &si, DeepShapeStore &dss, con
|
|||
template <class Sh>
|
||||
void EdgePairs::insert (const Sh &shape)
|
||||
{
|
||||
flat_edge_pairs ()->insert (shape);
|
||||
mutable_edge_pairs ()->insert (shape);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void EdgePairs::insert (const db::EdgePair &);
|
||||
|
||||
void EdgePairs::insert (const db::Shape &shape)
|
||||
{
|
||||
flat_edge_pairs ()->insert (shape);
|
||||
mutable_edge_pairs ()->insert (shape);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void EdgePairs::insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
flat_edge_pairs ()->insert (shape, trans);
|
||||
mutable_edge_pairs ()->insert (shape, trans);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void EdgePairs::insert (const db::Shape &, const db::ICplxTrans &);
|
||||
|
|
@ -120,13 +120,18 @@ void EdgePairs::clear ()
|
|||
|
||||
void EdgePairs::reserve (size_t n)
|
||||
{
|
||||
flat_edge_pairs ()->reserve (n);
|
||||
mutable_edge_pairs ()->reserve (n);
|
||||
}
|
||||
|
||||
void EdgePairs::flatten ()
|
||||
{
|
||||
mutable_edge_pairs ()->flatten ();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
EdgePairs &EdgePairs::transform (const T &trans)
|
||||
{
|
||||
flat_edge_pairs ()->transform (trans);
|
||||
mutable_edge_pairs ()->transform (trans);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -181,9 +186,9 @@ void EdgePairs::set_delegate (EdgePairsDelegate *delegate)
|
|||
}
|
||||
}
|
||||
|
||||
FlatEdgePairs *EdgePairs::flat_edge_pairs ()
|
||||
MutableEdgePairs *EdgePairs::mutable_edge_pairs ()
|
||||
{
|
||||
FlatEdgePairs *edge_pairs = dynamic_cast<FlatEdgePairs *> (mp_delegate);
|
||||
MutableEdgePairs *edge_pairs = dynamic_cast<MutableEdgePairs *> (mp_delegate);
|
||||
if (! edge_pairs) {
|
||||
edge_pairs = new FlatEdgePairs ();
|
||||
if (mp_delegate) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace db
|
|||
{
|
||||
|
||||
class EdgePairFilterBase;
|
||||
class FlatEdgePairs;
|
||||
class MutableEdgePairs;
|
||||
class EmptyEdgePairs;
|
||||
class Edges;
|
||||
class Region;
|
||||
|
|
@ -469,10 +469,7 @@ public:
|
|||
*
|
||||
* This method will turn any edge pair collection into a flat one.
|
||||
*/
|
||||
void flatten ()
|
||||
{
|
||||
flat_edge_pairs ();
|
||||
}
|
||||
void flatten ();
|
||||
|
||||
/**
|
||||
* @brief Returns true, if the edge pair set has valid edges stored within itself
|
||||
|
|
@ -615,7 +612,7 @@ private:
|
|||
EdgePairsDelegate *mp_delegate;
|
||||
|
||||
void set_delegate (EdgePairsDelegate *delegate);
|
||||
FlatEdgePairs *flat_edge_pairs ();
|
||||
MutableEdgePairs *mutable_edge_pairs ();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include "dbDeepEdges.h"
|
||||
#include "dbOriginalLayerEdges.h"
|
||||
#include "dbEmptyEdges.h"
|
||||
#include "dbMutableEdges.h"
|
||||
#include "dbFlatEdges.h"
|
||||
#include "dbEdgesUtils.h"
|
||||
#include "dbRegion.h"
|
||||
|
|
@ -133,7 +134,7 @@ Edges::clear ()
|
|||
void
|
||||
Edges::reserve (size_t n)
|
||||
{
|
||||
flat_edges ()->reserve (n);
|
||||
mutable_edges ()->reserve (n);
|
||||
}
|
||||
|
||||
void Edges::processed (Region &output, const EdgeToPolygonProcessorBase &filter) const
|
||||
|
|
@ -166,10 +167,16 @@ Edges Edges::centers (length_type length, double fraction) const
|
|||
return Edges (mp_delegate->processed (EdgeSegmentSelector (0, length, fraction)));
|
||||
}
|
||||
|
||||
void
|
||||
Edges::flatten ()
|
||||
{
|
||||
mutable_edges ()->flatten ();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Edges &Edges::transform (const T &trans)
|
||||
{
|
||||
flat_edges ()->transform (trans);
|
||||
mutable_edges ()->transform (trans);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +188,7 @@ template DB_PUBLIC Edges &Edges::transform (const db::Disp &);
|
|||
template <class Sh>
|
||||
void Edges::insert (const Sh &shape)
|
||||
{
|
||||
flat_edges ()->insert (shape);
|
||||
mutable_edges ()->insert (shape);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void Edges::insert (const db::Box &);
|
||||
|
|
@ -192,24 +199,25 @@ template DB_PUBLIC void Edges::insert (const db::Edge &);
|
|||
|
||||
void Edges::insert (const db::Shape &shape)
|
||||
{
|
||||
flat_edges ()->insert (shape);
|
||||
mutable_edges ()->insert (shape);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Edges::insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
flat_edges ()->insert (shape, trans);
|
||||
mutable_edges ()->insert (shape, trans);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void Edges::insert (const db::Shape &, const db::ICplxTrans &);
|
||||
template DB_PUBLIC void Edges::insert (const db::Shape &, const db::Trans &);
|
||||
template DB_PUBLIC void Edges::insert (const db::Shape &, const db::Disp &);
|
||||
|
||||
FlatEdges *
|
||||
Edges::flat_edges ()
|
||||
MutableEdges *
|
||||
Edges::mutable_edges ()
|
||||
{
|
||||
FlatEdges *edges = dynamic_cast<FlatEdges *> (mp_delegate);
|
||||
MutableEdges *edges = dynamic_cast<MutableEdges *> (mp_delegate);
|
||||
if (! edges) {
|
||||
|
||||
edges = new FlatEdges ();
|
||||
if (mp_delegate) {
|
||||
edges->EdgesDelegate::operator= (*mp_delegate);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
namespace db {
|
||||
|
||||
class EdgeFilterBase;
|
||||
class FlatEdges;
|
||||
class MutableEdges;
|
||||
class EmptyEdges;
|
||||
class DeepShapeStore;
|
||||
|
||||
|
|
@ -1112,10 +1112,7 @@ public:
|
|||
*
|
||||
* This method will turn any edge collection into a flat one.
|
||||
*/
|
||||
void flatten ()
|
||||
{
|
||||
flat_edges ();
|
||||
}
|
||||
void flatten ();
|
||||
|
||||
/**
|
||||
* @brief Returns true, if the edge set has valid edges stored within itself
|
||||
|
|
@ -1208,7 +1205,7 @@ private:
|
|||
EdgesDelegate *mp_delegate;
|
||||
|
||||
void set_delegate (EdgesDelegate *delegate, bool keep_attributes = true);
|
||||
FlatEdges *flat_edges ();
|
||||
MutableEdges *mutable_edges();
|
||||
};
|
||||
|
||||
} // namespace db
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace db
|
|||
// FlatEdgePairs implementation
|
||||
|
||||
FlatEdgePairs::FlatEdgePairs ()
|
||||
: AsIfFlatEdgePairs (), mp_edge_pairs (new db::Shapes (false))
|
||||
: MutableEdgePairs (), mp_edge_pairs (new db::Shapes (false))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -43,13 +43,13 @@ FlatEdgePairs::~FlatEdgePairs ()
|
|||
}
|
||||
|
||||
FlatEdgePairs::FlatEdgePairs (const FlatEdgePairs &other)
|
||||
: AsIfFlatEdgePairs (other), mp_edge_pairs (other.mp_edge_pairs)
|
||||
: MutableEdgePairs (other), mp_edge_pairs (other.mp_edge_pairs)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
FlatEdgePairs::FlatEdgePairs (const db::Shapes &edge_pairs)
|
||||
: AsIfFlatEdgePairs (), mp_edge_pairs (new db::Shapes (edge_pairs))
|
||||
: MutableEdgePairs (), mp_edge_pairs (new db::Shapes (edge_pairs))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -205,23 +205,11 @@ FlatEdgePairs::insert_into (Layout *layout, db::cell_index_type into_cell, unsig
|
|||
}
|
||||
|
||||
void
|
||||
FlatEdgePairs::insert (const db::EdgePair &ep)
|
||||
FlatEdgePairs::do_insert (const db::EdgePair &ep)
|
||||
{
|
||||
mp_edge_pairs->insert (ep);
|
||||
invalidate_cache ();
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdgePairs::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_edge_pair ()) {
|
||||
|
||||
db::EdgePair ep;
|
||||
shape.edge_pair (ep);
|
||||
insert (ep);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdgePairs.h"
|
||||
#include "dbMutableEdgePairs.h"
|
||||
#include "dbShapes.h"
|
||||
#include "dbGenericShapeIterator.h"
|
||||
#include "tlCopyOnWrite.h"
|
||||
|
|
@ -42,7 +42,7 @@ typedef generic_shapes_iterator_delegate<db::EdgePair> FlatEdgePairsIterator;
|
|||
* @brief The delegate for the actual edge pair set implementation
|
||||
*/
|
||||
class DB_PUBLIC FlatEdgePairs
|
||||
: public AsIfFlatEdgePairs
|
||||
: public MutableEdgePairs
|
||||
{
|
||||
public:
|
||||
typedef db::layer<db::EdgePair, db::unstable_layer_tag> edge_pair_layer_type;
|
||||
|
|
@ -82,41 +82,19 @@ public:
|
|||
virtual void insert_into (Layout *layout, db::cell_index_type into_cell, unsigned int into_layer) const;
|
||||
virtual void insert_into_as_polygons (Layout *layout, db::cell_index_type into_cell, unsigned int into_layer, db::Coord enl) const;
|
||||
|
||||
void insert (const db::EdgePair &edge_pair);
|
||||
void insert (const db::Shape &shape);
|
||||
virtual void do_insert (const db::EdgePair &edge_pair);
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
virtual void do_transform (const db::Trans &t)
|
||||
{
|
||||
if (shape.is_edge_pair ()) {
|
||||
|
||||
db::EdgePair ep;
|
||||
shape.edge_pair (ep);
|
||||
ep.transform (trans);
|
||||
insert (ep);
|
||||
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
virtual void do_transform (const db::ICplxTrans &t)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
void transform (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &ep = *mp_edge_pairs;
|
||||
for (edge_pair_iterator_type p = ep.template get_layer<db::EdgePair, db::unstable_layer_tag> ().begin (); p != ep.template get_layer<db::EdgePair, db::unstable_layer_tag> ().end (); ++p) {
|
||||
ep.get_layer<db::EdgePair, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
virtual void flatten () { }
|
||||
|
||||
db::Shapes &raw_edge_pairs () { return *mp_edge_pairs; }
|
||||
const db::Shapes &raw_edge_pairs () const { return *mp_edge_pairs; }
|
||||
|
|
@ -131,6 +109,18 @@ private:
|
|||
FlatEdgePairs &operator= (const FlatEdgePairs &other);
|
||||
|
||||
mutable tl::copy_on_write_ptr<db::Shapes> mp_edge_pairs;
|
||||
|
||||
template <class Trans>
|
||||
void transform_generic (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &ep = *mp_edge_pairs;
|
||||
for (edge_pair_iterator_type p = ep.template get_layer<db::EdgePair, db::unstable_layer_tag> ().begin (); p != ep.template get_layer<db::EdgePair, db::unstable_layer_tag> ().end (); ++p) {
|
||||
ep.get_layer<db::EdgePair, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace db
|
|||
// FlatEdges implementation
|
||||
|
||||
FlatEdges::FlatEdges ()
|
||||
: AsIfFlatEdges (), mp_edges (new db::Shapes (false)), mp_merged_edges (new db::Shapes (false))
|
||||
: MutableEdges (), mp_edges (new db::Shapes (false)), mp_merged_edges (new db::Shapes (false))
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ FlatEdges::~FlatEdges ()
|
|||
}
|
||||
|
||||
FlatEdges::FlatEdges (const FlatEdges &other)
|
||||
: AsIfFlatEdges (other), mp_edges (other.mp_edges), mp_merged_edges (other.mp_merged_edges)
|
||||
: MutableEdges (other), mp_edges (other.mp_edges), mp_merged_edges (other.mp_merged_edges)
|
||||
{
|
||||
init ();
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ FlatEdges::FlatEdges (const FlatEdges &other)
|
|||
}
|
||||
|
||||
FlatEdges::FlatEdges (const db::Shapes &edges, bool is_merged)
|
||||
: AsIfFlatEdges (), mp_edges (new db::Shapes (edges)), mp_merged_edges (new db::Shapes (false))
|
||||
: MutableEdges (), mp_edges (new db::Shapes (edges)), mp_merged_edges (new db::Shapes (false))
|
||||
{
|
||||
init ();
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ FlatEdges::FlatEdges (const db::Shapes &edges, bool is_merged)
|
|||
}
|
||||
|
||||
FlatEdges::FlatEdges (bool is_merged)
|
||||
: AsIfFlatEdges (), mp_edges (new db::Shapes (false)), mp_merged_edges (new db::Shapes (false))
|
||||
: MutableEdges (), mp_edges (new db::Shapes (false)), mp_merged_edges (new db::Shapes (false))
|
||||
{
|
||||
init ();
|
||||
|
||||
|
|
@ -320,69 +320,7 @@ const db::RecursiveShapeIterator *FlatEdges::iter () const
|
|||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::Box &box)
|
||||
{
|
||||
if (! box.empty () && box.width () > 0 && box.height () > 0) {
|
||||
|
||||
bool was_empty = empty ();
|
||||
|
||||
db::Shapes &e = *mp_edges;
|
||||
e.insert (db::Edge (box.lower_left (), box.upper_left ()));
|
||||
e.insert (db::Edge (box.upper_left (), box.upper_right ()));
|
||||
e.insert (db::Edge (box.upper_right (), box.lower_right ()));
|
||||
e.insert (db::Edge (box.lower_right (), box.lower_left ()));
|
||||
|
||||
if (was_empty) {
|
||||
|
||||
m_is_merged = true;
|
||||
update_bbox (box);
|
||||
|
||||
} else {
|
||||
|
||||
m_is_merged = false;
|
||||
invalidate_cache ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::Path &path)
|
||||
{
|
||||
if (path.points () > 0) {
|
||||
insert (path.polygon ());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::Polygon &polygon)
|
||||
{
|
||||
if (polygon.holes () > 0 || polygon.vertices () > 0) {
|
||||
db::Shapes &edges = *mp_edges;
|
||||
for (db::Polygon::polygon_edge_iterator e = polygon.begin_edge (); ! e.at_end (); ++e) {
|
||||
edges.insert (*e);
|
||||
}
|
||||
m_is_merged = false;
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::SimplePolygon &polygon)
|
||||
{
|
||||
if (polygon.vertices () > 0) {
|
||||
db::Shapes &edges = *mp_edges;
|
||||
for (db::SimplePolygon::polygon_edge_iterator e = polygon.begin_edge (); ! e.at_end (); ++e) {
|
||||
edges.insert (*e);
|
||||
}
|
||||
m_is_merged = false;
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::Edge &edge)
|
||||
FlatEdges::do_insert (const db::Edge &edge)
|
||||
{
|
||||
if (! empty ()) {
|
||||
m_is_merged = false;
|
||||
|
|
@ -392,23 +330,5 @@ FlatEdges::insert (const db::Edge &edge)
|
|||
invalidate_cache ();
|
||||
}
|
||||
|
||||
void
|
||||
FlatEdges::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_polygon () || shape.is_path () || shape.is_box ()) {
|
||||
|
||||
db::Polygon poly;
|
||||
shape.polygon (poly);
|
||||
insert (poly);
|
||||
|
||||
} else if (shape.is_edge ()) {
|
||||
|
||||
db::Edge edge;
|
||||
shape.edge (edge);
|
||||
insert (edge);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdges.h"
|
||||
#include "dbMutableEdges.h"
|
||||
#include "dbShapes.h"
|
||||
#include "dbShapes2.h"
|
||||
#include "dbGenericShapeIterator.h"
|
||||
|
|
@ -43,7 +43,7 @@ typedef generic_shapes_iterator_delegate<db::Edge> FlatEdgesIterator;
|
|||
* @brief A flat, edge-set delegate
|
||||
*/
|
||||
class DB_PUBLIC FlatEdges
|
||||
: public AsIfFlatEdges
|
||||
: public MutableEdges
|
||||
{
|
||||
public:
|
||||
typedef db::Edge value_type;
|
||||
|
|
@ -65,6 +65,7 @@ public:
|
|||
}
|
||||
|
||||
void reserve (size_t);
|
||||
void flatten () { }
|
||||
|
||||
virtual EdgesIteratorDelegate *begin () const;
|
||||
virtual EdgesIteratorDelegate *begin_merged () const;
|
||||
|
|
@ -91,60 +92,16 @@ public:
|
|||
|
||||
virtual const db::RecursiveShapeIterator *iter () const;
|
||||
|
||||
void insert (const db::Box &box);
|
||||
void insert (const db::Path &path);
|
||||
void insert (const db::SimplePolygon &polygon);
|
||||
void insert (const db::Polygon &polygon);
|
||||
void insert (const db::Edge &edge);
|
||||
void insert (const db::Shape &shape);
|
||||
void do_insert (const db::Edge &edge);
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
void do_transform (const db::Trans &t)
|
||||
{
|
||||
if (shape.is_polygon () || shape.is_path () || shape.is_box ()) {
|
||||
|
||||
db::Polygon poly;
|
||||
shape.polygon (poly);
|
||||
poly.transform (trans);
|
||||
insert (poly);
|
||||
|
||||
} else if (shape.is_edge ()) {
|
||||
|
||||
db::Edge edge;
|
||||
shape.edge (edge);
|
||||
edge.transform (trans);
|
||||
insert (edge);
|
||||
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert (const Iter &b, const Iter &e)
|
||||
void do_transform(const db::ICplxTrans &t)
|
||||
{
|
||||
reserve (count () + (e - b));
|
||||
for (Iter i = b; i != e; ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
void transform (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &e = *mp_edges;
|
||||
for (edge_iterator_type p = e.template get_layer<db::Edge, db::unstable_layer_tag> ().begin (); p != e.get_layer<db::Edge, db::unstable_layer_tag> ().end (); ++p) {
|
||||
e.get_layer<db::Edge, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
db::Shapes &raw_edges () { return *mp_edges; }
|
||||
|
|
@ -168,6 +125,18 @@ private:
|
|||
|
||||
void init ();
|
||||
void ensure_merged_edges_valid () const;
|
||||
|
||||
template <class Trans>
|
||||
void transform_generic (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &e = *mp_edges;
|
||||
for (edge_iterator_type p = e.template get_layer<db::Edge, db::unstable_layer_tag> ().begin (); p != e.get_layer<db::Edge, db::unstable_layer_tag> ().end (); ++p) {
|
||||
e.get_layer<db::Edge, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace db
|
|||
// FlatTexts implementation
|
||||
|
||||
FlatTexts::FlatTexts ()
|
||||
: AsIfFlatTexts (), mp_texts (new db::Shapes (false))
|
||||
: MutableTexts (), mp_texts (new db::Shapes (false))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -43,13 +43,13 @@ FlatTexts::~FlatTexts ()
|
|||
}
|
||||
|
||||
FlatTexts::FlatTexts (const FlatTexts &other)
|
||||
: AsIfFlatTexts (other), mp_texts (other.mp_texts)
|
||||
: MutableTexts (other), mp_texts (other.mp_texts)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
FlatTexts::FlatTexts (const db::Shapes &texts)
|
||||
: AsIfFlatTexts (), mp_texts (new db::Shapes (texts))
|
||||
: MutableTexts (), mp_texts (new db::Shapes (texts))
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -207,23 +207,11 @@ FlatTexts::insert_into (Layout *layout, db::cell_index_type into_cell, unsigned
|
|||
}
|
||||
|
||||
void
|
||||
FlatTexts::insert (const db::Text &t)
|
||||
FlatTexts::do_insert (const db::Text &t)
|
||||
{
|
||||
mp_texts->insert (t);
|
||||
invalidate_cache ();
|
||||
}
|
||||
|
||||
void
|
||||
FlatTexts::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_text ()) {
|
||||
|
||||
db::Text t;
|
||||
shape.text (t);
|
||||
insert (t);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatTexts.h"
|
||||
#include "dbMutableTexts.h"
|
||||
#include "dbShapes.h"
|
||||
#include "tlCopyOnWrite.h"
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ typedef generic_shapes_iterator_delegate<db::Text> FlatTextsIterator;
|
|||
* @brief The delegate for the actual text set implementation
|
||||
*/
|
||||
class DB_PUBLIC FlatTexts
|
||||
: public AsIfFlatTexts
|
||||
: public MutableTexts
|
||||
{
|
||||
public:
|
||||
typedef db::Text value_type;
|
||||
|
|
@ -83,40 +83,18 @@ public:
|
|||
virtual void insert_into (Layout *layout, db::cell_index_type into_cell, unsigned int into_layer) const;
|
||||
virtual void insert_into_as_polygons (Layout *layout, db::cell_index_type into_cell, unsigned int into_layer, db::Coord enl) const;
|
||||
|
||||
void insert (const db::Text &text);
|
||||
void insert (const db::Shape &shape);
|
||||
virtual void flatten () { }
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
void do_insert (const db::Text &text);
|
||||
|
||||
virtual void do_transform (const db::Trans &t)
|
||||
{
|
||||
if (shape.is_edge_pair ()) {
|
||||
|
||||
db::Text t;
|
||||
shape.text (t);
|
||||
t.transform (trans);
|
||||
insert (t);
|
||||
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
virtual void do_transform (const db::ICplxTrans &t)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Trans>
|
||||
void transform (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &texts = *mp_texts;
|
||||
for (text_iterator_type p = texts.template get_layer<db::Text, db::unstable_layer_tag> ().begin (); p != texts.template get_layer<db::Text, db::unstable_layer_tag> ().end (); ++p) {
|
||||
texts.get_layer<db::Text, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
transform_generic (t);
|
||||
}
|
||||
|
||||
db::Shapes &raw_texts () { return *mp_texts; }
|
||||
|
|
@ -132,6 +110,18 @@ private:
|
|||
FlatTexts &operator= (const FlatTexts &other);
|
||||
|
||||
mutable tl::copy_on_write_ptr<db::Shapes> mp_texts;
|
||||
|
||||
template <class Trans>
|
||||
void transform_generic (const Trans &trans)
|
||||
{
|
||||
if (! trans.is_unity ()) {
|
||||
db::Shapes &texts = *mp_texts;
|
||||
for (text_iterator_type p = texts.template get_layer<db::Text, db::unstable_layer_tag> ().begin (); p != texts.template get_layer<db::Text, db::unstable_layer_tag> ().end (); ++p) {
|
||||
texts.get_layer<db::Text, db::unstable_layer_tag> ().replace (p, p->transformed (trans));
|
||||
}
|
||||
invalidate_cache ();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbMutableEdgePairs.h"
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// MutableEdgePairs implementation
|
||||
|
||||
MutableEdgePairs::MutableEdgePairs ()
|
||||
: AsIfFlatEdgePairs ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableEdgePairs::MutableEdgePairs (const MutableEdgePairs &other)
|
||||
: AsIfFlatEdgePairs (other)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableEdgePairs::~MutableEdgePairs ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdgePairs::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_edge_pair ()) {
|
||||
insert (shape.edge_pair ());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HDR_dbMutableEdgePairs
|
||||
#define HDR_dbMutableEdgePairs
|
||||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdgePairs.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace db {
|
||||
|
||||
/**
|
||||
* @brief An interface representing mutable edge pair collections
|
||||
*
|
||||
* Mutable edge pair collections offer insert, transform, flatten and other manipulation functions.
|
||||
*/
|
||||
class DB_PUBLIC MutableEdgePairs
|
||||
: public AsIfFlatEdgePairs
|
||||
{
|
||||
public:
|
||||
MutableEdgePairs ();
|
||||
MutableEdgePairs (const MutableEdgePairs &other);
|
||||
virtual ~MutableEdgePairs ();
|
||||
|
||||
virtual void do_insert (const db::EdgePair &edge_pair) = 0;
|
||||
|
||||
virtual void do_transform (const db::Trans &t) = 0;
|
||||
virtual void do_transform (const db::ICplxTrans &t) = 0;
|
||||
|
||||
virtual void flatten () = 0;
|
||||
|
||||
virtual void reserve (size_t n) = 0;
|
||||
|
||||
void transform (const db::UnitTrans &) { }
|
||||
void transform (const db::Disp &t) { do_transform (db::Trans (t)); }
|
||||
void transform (const db::Trans &t) { do_transform (t); }
|
||||
void transform (const db::ICplxTrans &t) { do_transform (t); }
|
||||
|
||||
void insert (const db::EdgePair &edge_pair) { do_insert (edge_pair); }
|
||||
void insert (const db::Shape &shape);
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
if (shape.is_edge_pair ()) {
|
||||
db::EdgePair ep = shape.edge_pair ();
|
||||
ep.transform (trans);
|
||||
insert (ep);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert (const Iter &b, const Iter &e)
|
||||
{
|
||||
reserve (count () + (e - b));
|
||||
for (Iter i = b; i != e; ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbMutableEdges.h"
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// MutableEdges implementation
|
||||
|
||||
MutableEdges::MutableEdges ()
|
||||
: AsIfFlatEdges ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableEdges::MutableEdges (const MutableEdges &other)
|
||||
: AsIfFlatEdges (other)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableEdges::~MutableEdges ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdges::insert (const db::Box &box)
|
||||
{
|
||||
if (! box.empty () && box.width () > 0 && box.height () > 0) {
|
||||
do_insert (db::Edge (box.lower_left (), box.upper_left ()));
|
||||
do_insert (db::Edge (box.upper_left (), box.upper_right ()));
|
||||
do_insert (db::Edge (box.upper_right (), box.lower_right ()));
|
||||
do_insert (db::Edge (box.lower_right (), box.lower_left ()));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdges::insert (const db::Path &path)
|
||||
{
|
||||
if (path.points () > 0) {
|
||||
insert (path.polygon ());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdges::insert (const db::Polygon &polygon)
|
||||
{
|
||||
if (polygon.holes () > 0 || polygon.vertices () > 0) {
|
||||
for (db::Polygon::polygon_edge_iterator e = polygon.begin_edge (); ! e.at_end (); ++e) {
|
||||
do_insert (*e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdges::insert (const db::SimplePolygon &polygon)
|
||||
{
|
||||
if (polygon.vertices () > 0) {
|
||||
for (db::SimplePolygon::polygon_edge_iterator e = polygon.begin_edge (); ! e.at_end (); ++e) {
|
||||
do_insert (*e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MutableEdges::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_polygon () || shape.is_path () || shape.is_box ()) {
|
||||
|
||||
db::Polygon poly;
|
||||
shape.polygon (poly);
|
||||
insert (poly);
|
||||
|
||||
} else if (shape.is_edge ()) {
|
||||
|
||||
db::Edge edge;
|
||||
shape.edge (edge);
|
||||
do_insert (edge);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HDR_dbMutableEdges
|
||||
#define HDR_dbMutableEdges
|
||||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatEdges.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace db {
|
||||
|
||||
/**
|
||||
* @brief An interface representing mutable edge collections
|
||||
*
|
||||
* Mutable edge collections offer insert, transform, flatten and other manipulation functions.
|
||||
*/
|
||||
class DB_PUBLIC MutableEdges
|
||||
: public AsIfFlatEdges
|
||||
{
|
||||
public:
|
||||
MutableEdges ();
|
||||
MutableEdges (const MutableEdges &other);
|
||||
virtual ~MutableEdges ();
|
||||
|
||||
virtual void do_transform (const db::Trans &t) = 0;
|
||||
virtual void do_transform (const db::ICplxTrans &t) = 0;
|
||||
|
||||
virtual void flatten () = 0;
|
||||
|
||||
virtual void reserve (size_t n) = 0;
|
||||
|
||||
virtual void do_insert (const db::Edge &edge) = 0;
|
||||
|
||||
void transform (const db::UnitTrans &) { }
|
||||
void transform (const db::Disp &t) { do_transform (db::Trans (t)); }
|
||||
void transform (const db::Trans &t) { do_transform (t); }
|
||||
void transform (const db::ICplxTrans &t) { do_transform (t); }
|
||||
|
||||
void insert (const db::Edge &edge) { do_insert (edge); }
|
||||
void insert (const db::Box &box);
|
||||
void insert (const db::Path &path);
|
||||
void insert (const db::SimplePolygon &polygon);
|
||||
void insert (const db::Polygon &polygon);
|
||||
void insert (const db::Shape &shape);
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
if (shape.is_polygon () || shape.is_path () || shape.is_box ()) {
|
||||
|
||||
db::Polygon poly;
|
||||
shape.polygon (poly);
|
||||
poly.transform (trans);
|
||||
insert (poly);
|
||||
|
||||
} else if (shape.is_edge ()) {
|
||||
|
||||
db::Edge edge;
|
||||
shape.edge (edge);
|
||||
edge.transform (trans);
|
||||
insert (edge);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert (const Iter &b, const Iter &e)
|
||||
{
|
||||
reserve (count () + (e - b));
|
||||
for (Iter i = b; i != e; ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ namespace db {
|
|||
/**
|
||||
* @brief An interface representing mutable regions
|
||||
*
|
||||
* Mutable Regions offer insert, transform, flatten and other manipulation functions.
|
||||
* Mutable regions offer insert, transform, flatten and other manipulation functions.
|
||||
*/
|
||||
class DB_PUBLIC MutableRegion
|
||||
: public AsIfFlatRegion
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "dbMutableTexts.h"
|
||||
|
||||
namespace db
|
||||
{
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
// MutableTexts implementation
|
||||
|
||||
MutableTexts::MutableTexts ()
|
||||
: AsIfFlatTexts ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableTexts::MutableTexts (const MutableTexts &other)
|
||||
: AsIfFlatTexts (other)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
MutableTexts::~MutableTexts ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void
|
||||
MutableTexts::insert (const db::Shape &shape)
|
||||
{
|
||||
if (shape.is_text ()) {
|
||||
insert (shape.text ());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HDR_dbMutableTexts
|
||||
#define HDR_dbMutableTexts
|
||||
|
||||
#include "dbCommon.h"
|
||||
|
||||
#include "dbAsIfFlatTexts.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
namespace db {
|
||||
|
||||
/**
|
||||
* @brief An interface representing mutable text collections
|
||||
*
|
||||
* Mutable text collections offer insert, transform, flatten and other manipulation functions.
|
||||
*/
|
||||
class DB_PUBLIC MutableTexts
|
||||
: public AsIfFlatTexts
|
||||
{
|
||||
public:
|
||||
MutableTexts ();
|
||||
MutableTexts (const MutableTexts &other);
|
||||
virtual ~MutableTexts ();
|
||||
|
||||
virtual void do_insert (const db::Text &text) = 0;
|
||||
|
||||
virtual void do_transform (const db::Trans &t) = 0;
|
||||
virtual void do_transform (const db::ICplxTrans &t) = 0;
|
||||
|
||||
virtual void flatten () = 0;
|
||||
|
||||
virtual void reserve (size_t n) = 0;
|
||||
|
||||
void transform (const db::UnitTrans &) { }
|
||||
void transform (const db::Disp &t) { do_transform (db::Trans (t)); }
|
||||
void transform (const db::Trans &t) { do_transform (t); }
|
||||
void transform (const db::ICplxTrans &t) { do_transform (t); }
|
||||
|
||||
void insert (const db::Text &text) { do_insert (text); }
|
||||
void insert (const db::Shape &shape);
|
||||
|
||||
template <class T>
|
||||
void insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
if (shape.is_text ()) {
|
||||
db::Text text = shape.text ();
|
||||
text.transform (trans);
|
||||
insert (text);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert (const Iter &b, const Iter &e)
|
||||
{
|
||||
reserve (count () + (e - b));
|
||||
for (Iter i = b; i != e; ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Iter>
|
||||
void insert_seq (const Iter &seq)
|
||||
{
|
||||
for (Iter i = seq; ! i.at_end (); ++i) {
|
||||
insert (*i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -93,20 +93,20 @@ Texts::Texts (const RecursiveShapeIterator &si, DeepShapeStore &dss, const db::I
|
|||
template <class Sh>
|
||||
void Texts::insert (const Sh &shape)
|
||||
{
|
||||
flat_texts ()->insert (shape);
|
||||
mutable_texts ()->insert (shape);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void Texts::insert (const db::Text &);
|
||||
|
||||
void Texts::insert (const db::Shape &shape)
|
||||
{
|
||||
flat_texts ()->insert (shape);
|
||||
mutable_texts ()->insert (shape);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Texts::insert (const db::Shape &shape, const T &trans)
|
||||
{
|
||||
flat_texts ()->insert (shape, trans);
|
||||
mutable_texts ()->insert (shape, trans);
|
||||
}
|
||||
|
||||
template DB_PUBLIC void Texts::insert (const db::Shape &, const db::ICplxTrans &);
|
||||
|
|
@ -120,13 +120,18 @@ void Texts::clear ()
|
|||
|
||||
void Texts::reserve (size_t n)
|
||||
{
|
||||
flat_texts ()->reserve (n);
|
||||
mutable_texts ()->reserve (n);
|
||||
}
|
||||
|
||||
void Texts::flatten ()
|
||||
{
|
||||
mutable_texts ()->flatten ();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Texts &Texts::transform (const T &trans)
|
||||
{
|
||||
flat_texts ()->transform (trans);
|
||||
mutable_texts ()->transform (trans);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -161,9 +166,9 @@ void Texts::set_delegate (TextsDelegate *delegate)
|
|||
}
|
||||
}
|
||||
|
||||
FlatTexts *Texts::flat_texts ()
|
||||
MutableTexts *Texts::mutable_texts ()
|
||||
{
|
||||
FlatTexts *texts = dynamic_cast<FlatTexts *> (mp_delegate);
|
||||
MutableTexts *texts = dynamic_cast<MutableTexts *> (mp_delegate);
|
||||
if (! texts) {
|
||||
texts = new FlatTexts ();
|
||||
if (mp_delegate) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace db
|
|||
{
|
||||
|
||||
class TextFilterBase;
|
||||
class FlatTexts;
|
||||
class MutableTexts;
|
||||
class EmptyTexts;
|
||||
class Edges;
|
||||
class Region;
|
||||
|
|
@ -491,10 +491,7 @@ public:
|
|||
*
|
||||
* This method will turn any edge pair collection into a flat one.
|
||||
*/
|
||||
void flatten ()
|
||||
{
|
||||
flat_texts ();
|
||||
}
|
||||
void flatten ();
|
||||
|
||||
/**
|
||||
* @brief Returns true, if the text set has valid texts stored within itself
|
||||
|
|
@ -616,7 +613,7 @@ private:
|
|||
TextsDelegate *mp_delegate;
|
||||
|
||||
void set_delegate (TextsDelegate *delegate);
|
||||
FlatTexts *flat_texts ();
|
||||
MutableTexts *mutable_texts();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue