mirror of https://github.com/KLayout/klayout.git
WIP: further code.
This commit is contained in:
parent
18e63d352f
commit
f21dfb4a1c
|
|
@ -1,4 +1,25 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2020 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 "dbCompoundOperation.h"
|
||||
#include "dbRegion.h"
|
||||
|
||||
|
|
@ -25,6 +46,18 @@ namespace db
|
|||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
CompoundRegionOperationNode::CompoundRegionOperationNode ()
|
||||
{
|
||||
invalidate_cache ();
|
||||
}
|
||||
|
||||
CompoundRegionOperationNode::~CompoundRegionOperationNode ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
CompoundRegionOperationNode::compute_local (db::Layout *layout, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, size_t max_vertex_count, double area_ratio) const
|
||||
{
|
||||
|
|
@ -61,6 +94,16 @@ CompoundRegionOperationPrimaryNode::CompoundRegionOperationPrimaryNode ()
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
CompoundRegionOperationPrimaryNode::~CompoundRegionOperationPrimaryNode ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
std::string CompoundRegionOperationPrimaryNode::description () const
|
||||
{
|
||||
return std::string ("this");
|
||||
}
|
||||
|
||||
std::vector<db::Region *> CompoundRegionOperationPrimaryNode::inputs () const
|
||||
{
|
||||
return std::vector<db::Region *> ();
|
||||
|
|
@ -88,6 +131,16 @@ CompoundRegionOperationSecondaryNode::CompoundRegionOperationSecondaryNode (db::
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
CompoundRegionOperationSecondaryNode::~CompoundRegionOperationSecondaryNode ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
std::string CompoundRegionOperationSecondaryNode::description () const
|
||||
{
|
||||
return std::string ("other");
|
||||
}
|
||||
|
||||
std::vector<db::Region *> CompoundRegionOperationSecondaryNode::inputs () const
|
||||
{
|
||||
std::vector<db::Region *> iv;
|
||||
|
|
@ -949,3 +1002,4 @@ CompoundRegionToEdgePairProcessingOperationNode::processed (db::Layout *, const
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#ifndef HDR_dbCompoundOperation
|
||||
#define HDR_dbCompoundOperation
|
||||
|
||||
#include "dbCommon.h"
|
||||
#include "dbLocalOperation.h"
|
||||
#include "dbHierProcessor.h"
|
||||
#include "dbRegionDelegate.h"
|
||||
|
|
@ -46,12 +47,8 @@ class DB_PUBLIC CompoundRegionOperationNode
|
|||
public:
|
||||
enum ResultType { Region, Edges, EdgePairs };
|
||||
|
||||
CompoundRegionOperationNode ()
|
||||
{
|
||||
invalidate_cache ();
|
||||
}
|
||||
|
||||
virtual ~CompoundRegionOperationNode () { }
|
||||
CompoundRegionOperationNode ();
|
||||
virtual ~CompoundRegionOperationNode ();
|
||||
|
||||
virtual db::Coord dist () const = 0;
|
||||
virtual std::string description () const = 0;
|
||||
|
|
@ -221,10 +218,12 @@ class DB_PUBLIC CompoundRegionOperationPrimaryNode
|
|||
{
|
||||
public:
|
||||
CompoundRegionOperationPrimaryNode ();
|
||||
virtual ~CompoundRegionOperationPrimaryNode ();
|
||||
|
||||
virtual std::string description () const;
|
||||
|
||||
virtual std::vector<db::Region *> inputs () const;
|
||||
virtual db::Coord dist () const { return 0; }
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (db::Layout *layout, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, size_t max_vertex_count, double area_ratio) const;
|
||||
virtual void do_compute_local (db::Layout *layout, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, size_t max_vertex_count, double area_ratio) const;
|
||||
|
|
@ -236,10 +235,12 @@ class DB_PUBLIC CompoundRegionOperationSecondaryNode
|
|||
{
|
||||
public:
|
||||
CompoundRegionOperationSecondaryNode (db::Region *input);
|
||||
virtual ~CompoundRegionOperationSecondaryNode ();
|
||||
|
||||
virtual std::string description () const;
|
||||
|
||||
virtual std::vector<db::Region *> inputs () const;
|
||||
virtual db::Coord dist () const { return 0; }
|
||||
virtual ResultType result_type () const { return Region; }
|
||||
|
||||
virtual void do_compute_local (db::Layout *layout, const shape_interactions<db::Polygon, db::Polygon> &interactions, std::vector<std::unordered_set<db::Polygon> > &results, size_t max_vertex_count, double area_ratio) const;
|
||||
virtual void do_compute_local (db::Layout *layout, const shape_interactions<db::PolygonRef, db::PolygonRef> &interactions, std::vector<std::unordered_set<db::PolygonRef> > &results, size_t max_vertex_count, double area_ratio) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue