mirror of https://github.com/KLayout/klayout.git
Merge branch 'master' into hierarchical-edges
This commit is contained in:
commit
a02c2c8eeb
|
|
@ -80,6 +80,8 @@
|
|||
Iterated OASIS instances are stored and handled in a leaner way in viewer mode
|
||||
* Enhancement: Buddy scripts can concatenate files with "+" for input
|
||||
Concatenation happens by "blending files". Beware of the risk this implies.
|
||||
A new option "--blend-mode" has been introduced for supporting overwrite, skip
|
||||
and variant formation in case of cell name conflicts. See buddy script help.
|
||||
* Enhancement: Layer maps now support n:m layer mapping
|
||||
This allows mapping n input layers to one logical layer (merging) and also
|
||||
one input layer to m logical ones (clone layer). This applies to the
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ PropertiesPage::swap_points_clicked ()
|
|||
y1->setText (ty1);
|
||||
y2->setText (ty2);
|
||||
|
||||
db::Transaction t (manager (), tl::to_string (QObject::tr ("Swap ruler points")));
|
||||
emit edited ();
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +223,6 @@ PropertiesPage::snap_to_layout_clicked ()
|
|||
y2->setText (ys);
|
||||
}
|
||||
|
||||
db::Transaction t (manager (), tl::to_string (snap_p1 ? QObject::tr ("Snap first ruler point") : QObject::tr ("Snap second ruler point")));
|
||||
emit edited ();
|
||||
|
||||
break;
|
||||
|
|
@ -249,7 +247,6 @@ PropertiesPage::snap_to_layout_clicked ()
|
|||
x2->setText (tl::to_qstring (tl::micron_to_string (ee.second.x ())));
|
||||
y2->setText (tl::to_qstring (tl::micron_to_string (ee.second.y ())));
|
||||
|
||||
db::Transaction t (manager (), tl::to_string (QObject::tr ("Snap both ruler points")));
|
||||
emit edited ();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1274,8 +1274,9 @@ Service::end_move (const db::DPoint &, lay::angle_constraint_type)
|
|||
// compute moved object and replace
|
||||
ant::Object *rnew = new ant::Object (*robj);
|
||||
rnew->transform (m_trans);
|
||||
int new_id = rnew->id ();
|
||||
mp_view->annotation_shapes ().replace (s->first, db::DUserObject (rnew));
|
||||
annotation_changed_event (rnew->id ());
|
||||
annotation_changed_event (new_id);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ GenericReaderOptions::GenericReaderOptions ()
|
|||
|
||||
m_common_enable_text_objects = load_options.get_option_by_name ("text_enabled").to_bool ();
|
||||
m_common_enable_properties = load_options.get_option_by_name ("properties_enabled").to_bool ();
|
||||
m_cell_conflict_resolution = (unsigned int) db::CellConflictResolution::RenameCell;
|
||||
|
||||
m_gds2_box_mode = load_options.get_option_by_name ("gds2_box_mode").to_uint ();
|
||||
m_gds2_allow_big_records = load_options.get_option_by_name ("gds2_allow_big_records").to_bool ();
|
||||
|
|
@ -197,6 +198,15 @@ GenericReaderOptions::add_options (tl::CommandLineOptions &cmd)
|
|||
"Each line in this file is read as one layer mapping expression. "
|
||||
"Empty lines or lines starting with a hash (#) character or with double slashes (//) are ignored."
|
||||
)
|
||||
<< tl::arg (group +
|
||||
"--" + m_long_prefix + "blend-mode=mode", &m_cell_conflict_resolution, "Specifies how cell conflicts are resolved when using file concatenation",
|
||||
"When concatenating files with '+', the reader will handle cells with identical names according to this mode:\n"
|
||||
"\n"
|
||||
"* 0: joins everything (unsafe)\n"
|
||||
"* 1: overwrite\n"
|
||||
"* 2: skip new cell\n"
|
||||
"* 3: rename cell (safe, default)"
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -684,6 +694,7 @@ GenericReaderOptions::configure (db::LoadLayoutOptions &load_options) const
|
|||
load_options.set_option_by_name ("create_other_layers", m_create_other_layers);
|
||||
load_options.set_option_by_name ("text_enabled", m_common_enable_text_objects);
|
||||
load_options.set_option_by_name ("properties_enabled", m_common_enable_properties);
|
||||
load_options.get_options<db::CommonReaderOptions> ().cell_conflict_resolution = db::CellConflictResolution (m_cell_conflict_resolution);
|
||||
|
||||
load_options.set_option_by_name ("gds2_box_mode", m_gds2_box_mode);
|
||||
load_options.set_option_by_name ("gds2_allow_big_records", m_gds2_allow_big_records);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ private:
|
|||
bool m_create_other_layers;
|
||||
double m_dbu;
|
||||
bool m_keep_layer_names;
|
||||
unsigned int m_cell_conflict_resolution;
|
||||
|
||||
// common GDS2+OASIS
|
||||
bool m_common_enable_text_objects;
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ TEST(10)
|
|||
// General
|
||||
"-im=1/0 3,4/0-255 A:17/0",
|
||||
"-is",
|
||||
"--blend-mode=1",
|
||||
// OASIS
|
||||
"--expect-strict-mode=1"
|
||||
};
|
||||
|
|
@ -258,6 +259,7 @@ TEST(10)
|
|||
EXPECT_EQ (stream_opt.get_option_by_name ("dxf_text_scaling").to_int (), 100);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("layer_map").to_user<db::LayerMap> ().to_string (), "layer_map()");
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("create_other_layers").to_bool (), true);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("cell_conflict_resolution").to_string (), "AddToCell");
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("properties_enabled").to_bool (), true);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("text_enabled").to_bool (), true);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("gds2_box_mode").to_uint (), (unsigned int) 1);
|
||||
|
|
@ -283,6 +285,7 @@ TEST(10)
|
|||
EXPECT_EQ (stream_opt.get_option_by_name ("dxf_text_scaling").to_int (), 75);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("layer_map").to_user<db::LayerMap> ().to_string (), "layer_map('1/0';'3-4/0-255';'A : 17/0')");
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("create_other_layers").to_bool (), false);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("cell_conflict_resolution").to_string (), "OverwriteCell");
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("properties_enabled").to_bool (), false);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("text_enabled").to_bool (), false);
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("gds2_box_mode").to_uint (), (unsigned int) 3);
|
||||
|
|
@ -291,3 +294,22 @@ TEST(10)
|
|||
EXPECT_EQ (stream_opt.get_option_by_name ("oasis_expect_strict_mode").to_int (), 1);
|
||||
}
|
||||
|
||||
|
||||
// Testing reader options - blend mode "Rename" is default
|
||||
TEST(11)
|
||||
{
|
||||
bd::GenericReaderOptions opt;
|
||||
tl::CommandLineOptions cmd;
|
||||
|
||||
opt.add_options (cmd);
|
||||
|
||||
const char *argv[] = { "x" };
|
||||
|
||||
cmd.parse (sizeof (argv) / sizeof (argv[0]), (char **) argv);
|
||||
|
||||
db::LoadLayoutOptions stream_opt;
|
||||
opt.configure (stream_opt);
|
||||
|
||||
EXPECT_EQ (stream_opt.get_option_by_name ("cell_conflict_resolution").to_string (), "RenameCell");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -760,6 +760,15 @@ public:
|
|||
// .. nothing else ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Move constructor
|
||||
*/
|
||||
box_tree (box_tree &&b)
|
||||
: m_objects (b.m_objects), m_elements (b.m_elements), mp_root (b.mp_root)
|
||||
{
|
||||
b.mp_root = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
|
|
@ -774,6 +783,21 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment (move)
|
||||
*/
|
||||
box_tree &operator= (box_tree &&b)
|
||||
{
|
||||
clear ();
|
||||
m_objects = b.m_objects;
|
||||
m_elements = b.m_elements;
|
||||
if (b.mp_root) {
|
||||
mp_root = b.mp_root;
|
||||
b.mp_root = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
*/
|
||||
|
|
@ -1729,6 +1753,15 @@ public:
|
|||
// .. nothing else ..
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Move constructor
|
||||
*/
|
||||
unstable_box_tree (unstable_box_tree &&b)
|
||||
: m_objects (b.m_objects), mp_root (b.mp_root)
|
||||
{
|
||||
b.mp_root = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
|
|
@ -1742,6 +1775,20 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment (move)
|
||||
*/
|
||||
unstable_box_tree &operator= (unstable_box_tree &&b)
|
||||
{
|
||||
clear ();
|
||||
m_objects = b.m_objects;
|
||||
if (b.mp_root) {
|
||||
mp_root = b.mp_root;
|
||||
b.mp_root = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -357,10 +357,7 @@ CompoundRegionMultiInputOperationNode::init ()
|
|||
|
||||
CompoundRegionMultiInputOperationNode::~CompoundRegionMultiInputOperationNode ()
|
||||
{
|
||||
for (tl::shared_collection<CompoundRegionOperationNode>::iterator i = m_children.begin (); i != m_children.end (); ++i) {
|
||||
delete i.operator-> ();
|
||||
}
|
||||
m_children.clear ();
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -107,6 +107,14 @@ struct layer
|
|||
operator= (d);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The move constructor
|
||||
*/
|
||||
layer (const layer &&d)
|
||||
{
|
||||
operator= (d);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The assignment operator
|
||||
*
|
||||
|
|
@ -123,6 +131,20 @@ struct layer
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The assignment operator (move semantics)
|
||||
*/
|
||||
layer &operator= (const layer &&d)
|
||||
{
|
||||
if (&d != this) {
|
||||
m_box_tree = d.m_box_tree;
|
||||
m_bbox = d.m_bbox;
|
||||
m_bbox_dirty = d.m_bbox_dirty;
|
||||
m_tree_dirty = d.m_tree_dirty;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the iterator for an object given by a pointer
|
||||
*/
|
||||
|
|
@ -207,6 +229,18 @@ struct layer
|
|||
return m_box_tree.insert (sh);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Insert a new shape object (move semantics)
|
||||
*/
|
||||
iterator insert (const Sh &&sh)
|
||||
{
|
||||
// inserting will make the bbox and the tree "dirty" - i.e.
|
||||
// it will need to be updated.
|
||||
m_bbox_dirty = true;
|
||||
m_tree_dirty = true;
|
||||
return m_box_tree.insert (sh);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace the given element with a new one
|
||||
*
|
||||
|
|
@ -228,6 +262,19 @@ struct layer
|
|||
return *ncpos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace the given element with a new one (move semantics)
|
||||
*/
|
||||
Sh &replace (iterator pos, const Sh &&sh)
|
||||
{
|
||||
m_bbox_dirty = true;
|
||||
m_tree_dirty = true;
|
||||
non_const_iterator ncpos;
|
||||
to_non_const_box_tree_iter (pos, ncpos, StableTag ());
|
||||
*ncpos = sh;
|
||||
return *ncpos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Erasing of an element
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1626,7 +1626,7 @@ AreaMap::reinitialize (const db::Point &p0, const db::Vector &d, const db::Vecto
|
|||
m_ny = ny;
|
||||
|
||||
if (mp_av) {
|
||||
delete mp_av;
|
||||
delete[] mp_av;
|
||||
}
|
||||
|
||||
mp_av = new area_type [nx * ny];
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ public:
|
|||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return true; } // we believe so ...
|
||||
virtual bool result_is_merged () const { return false; } // isn't merged for nested holes :(
|
||||
virtual bool requires_raw_input () const { return false; }
|
||||
virtual bool wants_variants () const { return true; }
|
||||
virtual bool result_must_not_be_merged () const { return false; }
|
||||
|
|
@ -577,7 +577,7 @@ public:
|
|||
virtual void process (const db::Polygon &poly, std::vector<db::Polygon> &res) const;
|
||||
|
||||
virtual const TransformationReducer *vars () const { return 0; }
|
||||
virtual bool result_is_merged () const { return true; } // we believe so ...
|
||||
virtual bool result_is_merged () const { return false; } // isn't merged for nested hulls :(
|
||||
virtual bool requires_raw_input () const { return false; }
|
||||
virtual bool wants_variants () const { return true; }
|
||||
virtual bool result_must_not_be_merged () const { return false; }
|
||||
|
|
|
|||
|
|
@ -206,6 +206,18 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The move constructor
|
||||
*/
|
||||
user_object (user_object<C> &&d)
|
||||
: mp_obj (0)
|
||||
{
|
||||
if (d.mp_obj) {
|
||||
set_ptr (d.mp_obj);
|
||||
d.mp_obj = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment operator
|
||||
*/
|
||||
|
|
@ -219,6 +231,20 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment operator (move)
|
||||
*/
|
||||
user_object<C> &operator= (user_object<C> &&d)
|
||||
{
|
||||
if (d.mp_obj) {
|
||||
set_ptr (d.mp_obj);
|
||||
d.mp_obj = 0;
|
||||
} else {
|
||||
set_ptr (0);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ void run_test1 (tl::TestBase *_this, bool deep)
|
|||
unsigned int l1002 = ly.get_layer (db::LayerProperties (1002, 0));
|
||||
res.insert_into (&ly, *ly.begin_top_down (), l1002);
|
||||
|
||||
primary = new db::CompoundRegionOperationPrimaryNode ();
|
||||
db::CompoundRegionCheckOperationNode space_check (primary, db::SpaceRelation, false /*==all polygons*/, 1050, check_options);
|
||||
|
||||
res = r.cop_to_edge_pairs (space_check);
|
||||
|
|
|
|||
|
|
@ -694,8 +694,8 @@ TEST(10_HullsAndHoles)
|
|||
|
||||
db::Region hulls = r1_sized.hulls ();
|
||||
db::Region holes = r1_sized.holes ();
|
||||
EXPECT_EQ (hulls.is_merged (), true);
|
||||
EXPECT_EQ (holes.is_merged (), true);
|
||||
EXPECT_EQ (hulls.is_merged (), false);
|
||||
EXPECT_EQ (holes.is_merged (), false);
|
||||
|
||||
db::Layout target;
|
||||
unsigned int target_top_cell_index = target.add_cell (ly.cell_name (top_cell_index));
|
||||
|
|
|
|||
|
|
@ -456,31 +456,38 @@
|
|||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string> Column vector (x,y)</string>
|
||||
<item row="2" column="2">
|
||||
<widget class="QFrame" name="frame_7">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>x =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLineEdit" name="column_y_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="row_x_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
|
|
@ -493,207 +500,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>y =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="row_x_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>x =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string> Row vector (x,y)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string> Rows/Columns</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>columns =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="columns_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>rows = </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="rows_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5">
|
||||
<widget class="QLabel" name="inst_lbl">
|
||||
<property name="text">
|
||||
<string>This is instance [r,c] of array with</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="6">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string><b>Warning</b>: although row and column vectors can be arbitrary combination, some design systems and mask makers only accept orthogonal (rectangular) arrays. Set the gray fields to 0 in this case.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>87</green>
|
||||
<blue>83</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>243</red>
|
||||
<green>243</green>
|
||||
<blue>243</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>87</green>
|
||||
<blue>83</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>243</red>
|
||||
<green>243</green>
|
||||
<blue>243</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>239</red>
|
||||
<green>239</green>
|
||||
<blue>239</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
|
|
@ -726,99 +534,82 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>y =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string> Rows/Columns</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QFrame" name="frame_8">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="column_y_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="rows_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QFrame" name="frame_6">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>87</green>
|
||||
<blue>83</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>243</red>
|
||||
<green>243</green>
|
||||
<blue>243</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>85</red>
|
||||
<green>87</green>
|
||||
<blue>83</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>243</red>
|
||||
<green>243</green>
|
||||
<blue>243</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>239</red>
|
||||
<green>239</green>
|
||||
<blue>239</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
|
|
@ -851,6 +642,115 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string> Column vector (x,y)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>x =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>x =</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5">
|
||||
<widget class="QLabel" name="inst_lbl">
|
||||
<property name="text">
|
||||
<string>This is instance [r,c] of array with</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="columns_le">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>columns =</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>rows = </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string> Row vector (x,y)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="6">
|
||||
<widget class="QFrame" name="ortho_warning_frame">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../lay/lay/layResources.qrc">:/warn.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Although row and column vectors can be arbitrary combinations, some design systems and mask makers only accept arrays where row and column vectors are orthogonal and parallel to x and y axes.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -978,14 +878,19 @@
|
|||
<tabstop>browse_pb</tabstop>
|
||||
<tabstop>lib_cbx</tabstop>
|
||||
<tabstop>param_tab_widget</tabstop>
|
||||
<tabstop>cw_le</tabstop>
|
||||
<tabstop>ch_le</tabstop>
|
||||
<tabstop>pos_x_le</tabstop>
|
||||
<tabstop>pos_y_le</tabstop>
|
||||
<tabstop>angle_le</tabstop>
|
||||
<tabstop>mirror_cbx</tabstop>
|
||||
<tabstop>mag_le</tabstop>
|
||||
<tabstop>array_grp</tabstop>
|
||||
<tabstop>rows_le</tabstop>
|
||||
<tabstop>columns_le</tabstop>
|
||||
<tabstop>row_x_le</tabstop>
|
||||
<tabstop>row_y_le</tabstop>
|
||||
<tabstop>column_x_le</tabstop>
|
||||
<tabstop>column_y_le</tabstop>
|
||||
<tabstop>dbu_cb</tabstop>
|
||||
<tabstop>abs_cb</tabstop>
|
||||
|
|
@ -993,6 +898,8 @@
|
|||
<tabstop>sel_pb</tabstop>
|
||||
<tabstop>inst_pb</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../lay/lay/layResources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ namespace edt
|
|||
// -------------------------------------------------------------------------
|
||||
// InstPropertiesPage implementation
|
||||
|
||||
static bool is_orthogonal (const db::DVector &rv, const db::DVector &cv)
|
||||
{
|
||||
return (db::coord_traits<db::DCoord>::equal (rv.x (), 0) && db::coord_traits<db::DCoord>::equal (cv.y (), 0)) ||
|
||||
(db::coord_traits<db::DCoord>::equal (rv.y (), 0) && db::coord_traits<db::DCoord>::equal (cv.x (), 0));
|
||||
}
|
||||
|
||||
InstPropertiesPage::InstPropertiesPage (edt::Service *service, db::Manager *manager, QWidget *parent)
|
||||
: lay::PropertiesPage (parent, manager, service), mp_service (service), m_enable_cb_callback (true), mp_pcell_parameters (0)
|
||||
{
|
||||
|
|
@ -323,6 +329,8 @@ InstPropertiesPage::update ()
|
|||
|
||||
}
|
||||
|
||||
ortho_warning_frame->setEnabled (! is_orthogonal (db::CplxTrans (dbu) * rowv, db::CplxTrans (dbu) * columnv));
|
||||
|
||||
} else {
|
||||
|
||||
array_grp->setChecked (false);
|
||||
|
|
@ -334,6 +342,8 @@ InstPropertiesPage::update ()
|
|||
column_y_le->setText (QString ());
|
||||
inst_lbl->setText (QString ());
|
||||
|
||||
ortho_warning_frame->setEnabled (false);
|
||||
|
||||
}
|
||||
|
||||
pos_x_le->setText (tl::to_qstring (coord_to_string ((gt * db::ICplxTrans (t)).disp ().x (), dbu, du)));
|
||||
|
|
@ -542,6 +552,9 @@ InstPropertiesPage::create_applicator (db::Cell & /*cell*/, const db::Instance &
|
|||
|
||||
try {
|
||||
tl::from_string (tl::to_string (rows_le->text ()), rows);
|
||||
if (rows < 1) {
|
||||
throw tl::Exception (tl::to_string (tr ("Rows count can't be zero")));
|
||||
}
|
||||
lay::indicate_error (rows_le, (tl::Exception *) 0);
|
||||
} catch (tl::Exception &ex) {
|
||||
lay::indicate_error (rows_le, &ex);
|
||||
|
|
@ -550,14 +563,19 @@ InstPropertiesPage::create_applicator (db::Cell & /*cell*/, const db::Instance &
|
|||
|
||||
try {
|
||||
tl::from_string (tl::to_string (columns_le->text ()), cols);
|
||||
if (cols < 1) {
|
||||
throw tl::Exception (tl::to_string (tr ("Columns count can't be zero")));
|
||||
}
|
||||
lay::indicate_error (columns_le, (tl::Exception *) 0);
|
||||
} catch (tl::Exception &ex) {
|
||||
lay::indicate_error (columns_le, &ex);
|
||||
has_error = true;
|
||||
}
|
||||
|
||||
db::DVector rv = db::DVector (dpoint_from_dpoint (db::DPoint (rx, ry), dbu, du, t));
|
||||
db::DVector cv = db::DVector (dpoint_from_dpoint (db::DPoint (cx, cy), dbu, du, t));
|
||||
db::DVector rv = dvector_from_dvector (db::DVector (rx, ry), dbu, du, t);
|
||||
db::DVector cv = dvector_from_dvector (db::DVector (cx, cy), dbu, du, t);
|
||||
|
||||
ortho_warning_frame->setEnabled (! is_orthogonal (rv, cv));
|
||||
|
||||
bool set_a = (! rv.equal (a_org * dbu) || ! is_array_org);
|
||||
bool set_na = (rows != na_org || ! is_array_org);
|
||||
|
|
|
|||
|
|
@ -438,6 +438,20 @@ db::DCoord dcoord_from_dcoord (double d, double dbu, bool du, const db::CplxTran
|
|||
*/
|
||||
db::DPoint dpoint_from_dpoint (const db::DPoint &dp, double dbu, bool du, const db::DCplxTrans &t);
|
||||
|
||||
/**
|
||||
* @brief Converts a micron or DBU vector to a micron point
|
||||
*
|
||||
* @param dp The point to convert
|
||||
* @param dbu The database unit
|
||||
* @param du A flag indicating whether the input point is given in database units (du = true) or micron (du = false)
|
||||
* @param t A transformation (in DBU space) to apply to the point
|
||||
* @return The micron-unit point
|
||||
*
|
||||
* The transformation is intended to be a global-to-local transformation so the output value is
|
||||
* a point in local-cell micron units.
|
||||
*/
|
||||
db::DVector dvector_from_dvector (const db::DVector &dp, double dbu, bool du, const db::DCplxTrans &t);
|
||||
|
||||
/**
|
||||
* @brief Gets a dimension value from a string
|
||||
*
|
||||
|
|
|
|||
|
|
@ -642,7 +642,6 @@ static void collect_classes (const gsi::ClassBase *cls, std::list<const gsi::Cla
|
|||
unsorted_classes.push_back (cls);
|
||||
|
||||
for (tl::weak_collection<gsi::ClassBase>::const_iterator cc = cls->begin_child_classes (); cc != cls->end_child_classes (); ++cc) {
|
||||
tl_assert (cc->declaration () != 0);
|
||||
collect_classes (cc.operator-> (), unsorted_classes);
|
||||
}
|
||||
}
|
||||
|
|
@ -678,9 +677,8 @@ ClassBase::classes_in_definition_order (const char *mod_name)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
||||
if ((*c)->declaration () && (*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
||||
// can't produce this class yet - it's a reference to another class which is not produced yet.
|
||||
tl_assert ((*c)->declaration () != 0);
|
||||
more_classes.push_back (*c);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -710,8 +708,8 @@ ClassBase::classes_in_definition_order (const char *mod_name)
|
|||
// don't handle classes twice
|
||||
if (taken.find (*c) != taken.end ()) {
|
||||
// not considered.
|
||||
} else if ((*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
||||
// can't produce this class yet - it's a child of a parent that is not produced yet.
|
||||
} else if ((*c)->declaration () && (*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
||||
// can't produce this class yet - it refers to a class whic is not available.
|
||||
tl::error << tl::sprintf ("class %s.%s refers to another class (%s.%s) which is not available", (*c)->module (), (*c)->name (), (*c)->declaration ()->module (), (*c)->declaration ()->name ());
|
||||
} else if ((*c)->parent () != 0 && taken.find ((*c)->parent ()) == taken.end ()) {
|
||||
// can't produce this class yet - it's a child of a parent that is not produced yet.
|
||||
|
|
|
|||
|
|
@ -1074,21 +1074,29 @@ initialize_expressions ()
|
|||
gsi::initialize ();
|
||||
|
||||
// Go through all classes (maybe again)
|
||||
for (gsi::ClassBase::class_iterator c = gsi::ClassBase::begin_classes (); c != gsi::ClassBase::end_classes (); ++c) {
|
||||
std::list<const gsi::ClassBase *> classes = gsi::ClassBase::classes_in_definition_order ();
|
||||
for (std::list<const gsi::ClassBase *>::const_iterator c = classes.begin (); c != classes.end (); ++c) {
|
||||
|
||||
// Skip external classes
|
||||
if (c->is_external ()) {
|
||||
if ((*c)->is_external ()) {
|
||||
// skip external classes
|
||||
continue;
|
||||
} else if ((*c)->declaration () != *c) {
|
||||
// we might encounter a child class which is a reference to a top-level class (e.g.
|
||||
// duplication of enums into child classes). In this case we should create a reference inside the
|
||||
// target class.
|
||||
tl_assert ((*c)->parent () != 0); // top-level classes should be merged
|
||||
// TODO: implement (see rba.cc:1544 for example)
|
||||
continue;
|
||||
}
|
||||
|
||||
// install the method table:
|
||||
ExpressionMethodTable::initialize_class (&*c);
|
||||
ExpressionMethodTable::initialize_class (*c);
|
||||
|
||||
// register a function that creates a class object (use a function to avoid issues with
|
||||
// late destruction of global variables which the class object is already gone)
|
||||
const tl::VariantUserClassBase *cc = c->var_cls_cls ();
|
||||
const tl::VariantUserClassBase *cc = (*c)->var_cls_cls ();
|
||||
if (cc) {
|
||||
tl::Eval::define_global_function (c->name (), new EvalClassFunction (cc));
|
||||
tl::Eval::define_global_function ((*c)->name (), new EvalClassFunction (cc));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@ AnnotationShapes::AnnotationShapes (const AnnotationShapes &d)
|
|||
operator= (d);
|
||||
}
|
||||
|
||||
AnnotationShapes::AnnotationShapes (const AnnotationShapes &&d)
|
||||
: db::LayoutStateModel (true /*busy*/), db::Object (d)
|
||||
{
|
||||
operator= (d);
|
||||
}
|
||||
|
||||
AnnotationShapes::~AnnotationShapes ()
|
||||
{
|
||||
clear ();
|
||||
|
|
@ -106,7 +112,21 @@ AnnotationShapes::operator= (const AnnotationShapes &d)
|
|||
}
|
||||
return *this;
|
||||
}
|
||||
void
|
||||
|
||||
AnnotationShapes &
|
||||
AnnotationShapes::operator= (const AnnotationShapes &&d)
|
||||
{
|
||||
if (&d != this) {
|
||||
clear ();
|
||||
if (manager () && manager ()->transacting ()) {
|
||||
manager ()->queue (this, new AnnotationLayerOp (true /*insert*/, d.m_layer.begin (), d.m_layer.end ()));
|
||||
}
|
||||
m_layer = d.m_layer;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
AnnotationShapes::clear ()
|
||||
{
|
||||
if (manager () && manager ()->transacting ()) {
|
||||
|
|
@ -126,7 +146,17 @@ AnnotationShapes::insert (const shape_type &sh)
|
|||
return *m_layer.insert (sh);
|
||||
}
|
||||
|
||||
void
|
||||
const AnnotationShapes::shape_type &
|
||||
AnnotationShapes::insert (const shape_type &&sh)
|
||||
{
|
||||
if (manager () && manager ()->transacting ()) {
|
||||
manager ()->queue (this, new AnnotationLayerOp (true /*insert*/, sh));
|
||||
}
|
||||
invalidate_state (); // HINT: must come before the change is done!
|
||||
return *m_layer.insert (sh);
|
||||
}
|
||||
|
||||
void
|
||||
AnnotationShapes::reserve (size_t n)
|
||||
{
|
||||
m_layer.reserve (n);
|
||||
|
|
@ -156,7 +186,21 @@ AnnotationShapes::replace (iterator pos, const shape_type &sh)
|
|||
return *pos;
|
||||
}
|
||||
|
||||
void
|
||||
const AnnotationShapes::shape_type &
|
||||
AnnotationShapes::replace (iterator pos, const shape_type &&sh)
|
||||
{
|
||||
if (&*pos != &sh && *pos != sh) {
|
||||
if (manager () && manager ()->transacting ()) {
|
||||
manager ()->queue (this, new AnnotationLayerOp (false /*not insert*/, *pos));
|
||||
manager ()->queue (this, new AnnotationLayerOp (true /*insert*/, sh));
|
||||
}
|
||||
invalidate_state (); // HINT: must come before the change is done!
|
||||
m_layer.replace (pos, sh);
|
||||
}
|
||||
return *pos;
|
||||
}
|
||||
|
||||
void
|
||||
AnnotationShapes::redo (db::Op *op)
|
||||
{
|
||||
AnnotationLayerOp *layop = dynamic_cast<AnnotationLayerOp *> (op);
|
||||
|
|
|
|||
|
|
@ -135,16 +135,37 @@ public:
|
|||
*/
|
||||
AnnotationShapes (const AnnotationShapes &d);
|
||||
|
||||
/**
|
||||
* @brief Copy ctor
|
||||
*/
|
||||
AnnotationShapes (const AnnotationShapes &&d);
|
||||
|
||||
/**
|
||||
* @brief Assignment operator
|
||||
*/
|
||||
AnnotationShapes &operator= (const AnnotationShapes &d);
|
||||
|
||||
/**
|
||||
* @brief Assignment operator (move)
|
||||
*/
|
||||
AnnotationShapes &operator= (const AnnotationShapes &&d);
|
||||
|
||||
/**
|
||||
* @brief Insert a shape_type
|
||||
*/
|
||||
const shape_type &insert (const shape_type &sh);
|
||||
|
||||
/**
|
||||
* @brief Insert a sequence of DUserObject shapes
|
||||
*
|
||||
* Inserts a sequence of shapes [from,to)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Insert a shape_type (move semantics)
|
||||
*/
|
||||
const shape_type &insert (const shape_type &&sh);
|
||||
|
||||
/**
|
||||
* @brief Insert a sequence of DUserObject shapes
|
||||
*
|
||||
|
|
@ -212,6 +233,11 @@ public:
|
|||
*/
|
||||
const shape_type &replace (iterator pos, const shape_type &sh);
|
||||
|
||||
/**
|
||||
* @brief Replace an element at the given position with another shape (move semantics)
|
||||
*/
|
||||
const shape_type &replace (iterator pos, const shape_type &&sh);
|
||||
|
||||
/**
|
||||
* @brief updates the bbox
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1027,6 +1027,8 @@ NetlistBrowserPage::adjust_view ()
|
|||
ebox += bbox_for_device_abstract (layout, a->device_abstract, a->trans);
|
||||
}
|
||||
|
||||
trans *= device->trans ();
|
||||
|
||||
} else if (net) {
|
||||
|
||||
db::cell_index_type cell_index = net->circuit ()->cell_index ();
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ PropertiesDialog::apply ()
|
|||
{
|
||||
BEGIN_PROTECTED
|
||||
|
||||
db::Transaction t (mp_manager, tl::to_string (QObject::tr ("Auto-apply changes")), m_transaction_id);
|
||||
db::Transaction t (mp_manager, tl::to_string (QObject::tr ("Apply changes")), m_transaction_id);
|
||||
|
||||
try {
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,13 @@ GDS2Reader::get_string ()
|
|||
void
|
||||
GDS2Reader::get_string (std::string &s) const
|
||||
{
|
||||
s.assign ((const char *) mp_rec_buf, 0, m_reclen);
|
||||
if (m_reclen == 0) {
|
||||
s.clear ();
|
||||
} else if (mp_rec_buf [m_reclen - 1] != 0) {
|
||||
s.assign ((const char *) mp_rec_buf, m_reclen);
|
||||
} else {
|
||||
s.assign ((const char *) mp_rec_buf, m_reclen - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -535,6 +535,19 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Move constructor
|
||||
*
|
||||
* See operator= for a description of the copy operation.
|
||||
*/
|
||||
reuse_vector (reuse_vector &&d)
|
||||
{
|
||||
mp_start = d.mp_start; d.mp_start = 0;
|
||||
mp_finish = d.mp_finish; d.mp_finish = 0;
|
||||
mp_capacity = d.mp_capacity; d.mp_capacity = 0;
|
||||
mp_rdata = d.mp_rdata; d.mp_rdata = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
|
|
@ -562,6 +575,20 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment (move)
|
||||
*/
|
||||
reuse_vector &operator= (reuse_vector &&d)
|
||||
{
|
||||
if (&d != this) {
|
||||
mp_start = d.mp_start; d.mp_start = 0;
|
||||
mp_finish = d.mp_finish; d.mp_finish = 0;
|
||||
mp_capacity = d.mp_capacity; d.mp_capacity = 0;
|
||||
mp_rdata = d.mp_rdata; d.mp_rdata = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ public:
|
|||
*/
|
||||
explicit vector (const tl::vector<T> &d) : base (d) { }
|
||||
|
||||
/**
|
||||
* @brief Move constructor
|
||||
*/
|
||||
explicit vector (const tl::vector<T> &&d) : base (d) { }
|
||||
|
||||
/**
|
||||
* @brief Assignment
|
||||
*/
|
||||
|
|
@ -71,6 +76,17 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assignment (Move)
|
||||
*/
|
||||
vector &operator= (const tl::vector<T> &&d)
|
||||
{
|
||||
if (&d != this) {
|
||||
base::operator= (d);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialization with value and length
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue