Glade Reference


lpp class

A lpp object forms a layer-purpose pair. It manages objects in a tree structure for fast spatial searching.

 

lpp::lpp(cellView * cv)

Constructs a lpp object with master cellView cv. Normally never used - lpps are created and managed by a cellView object. You can use the cellView getLpp() function to get an existing lpp by name or by number

 

lpp::clear()

Clears the lpp. All objects managed by the lpp are removed leaving it empty. They are not deleted, however.

 

lpp::layerName(const char *name)

Sets the layer name of the lpp. Note this will not change the layer name used in the techfile, so beware.

 

const char * lpp::layerName()

Gets the lpp's layer name

 

lpp::purpose(const char *name)

Sets the purpose name of the lpp. Note this will not change the purpose name used in the techfile, so beware.

 

const char * lpp::purpose()

Gets the lpp's purpose name

 

lpp::layerNum(int32_t layerNum)

Sets the layer number of the lpp. Note this will not change the layer number used in the techfile, so beware.

 

int32_t lpp::layerNum()

Gets the lpp's layer number

 

int32_t lpp::numShapes()

Gets the number of shapes in this lpp.

 

cellView * lpp::cv()

Get the cellView for this lpp.

 

Rect lpp::bBox()

Get the bounding box of all shapes in this lpp.

 

lpp::bBox(Rect box)

Set the bounding box of the lpp. Should not normally be used.

 

lpp::optimiseTree()

Optimise the lpp. Must be carried out after adding objects.

 

lpp::updateTree(dbObj * obj)

Update the lpp for a single object.

 

int32_t lpp::dbGetOverlaps (dbObjList<dbObj> *list, const Rect &searchRect, int filterSize=0)

Search the lpp for shapes overlapping the search rectangle searchRect, returning those found in list (which must be passed in by the caller). If filterSize is non-zero, only shapes with a width and height greater than filterSize are reported. The number of shapes found is returned.

 

lpp::getOverlaps (Rect searchRect, int filterSize=0)

As above, but returns a Python list.

 

int32_t lpp::dbGetOverlaps (dbObjList<dbHierObj> *list, transform trans, const Rect &searchRect, int filterSize=0)

Search the lpp for shapes overlapping the search rectangle searchRect, returning those as dbHierObj created using the transform trans, in list (which must be passed in by the caller). If filterSize is non-zero, only shapes with a width and height greater than filterSize are reported. The number of shapes found is returned.

 

Iterator

An iterator to allow traversing the objects in the lpp using Python.

 

iter = objIterator(lpp *l)

Initialises the dbObj iterator for the lpp. For example:

          iter = objIterator(lpp)
          while not iter.end() :
              obj = iter.value()
              type = obj.objType()
              print "object type = ", type
              iter.next() 
        

 

dbObj * iter.value()

Returns the current object.

 

iter.next()

Advances the iterator to the next dbObj.

 

bool iter.end()

Returns false if there are more objects, else returns true if there are no more.

 

 

Contents|Index

Copyright © Peardrop Design 2024.