Glade Reference
The dbObj class is the base class of Glade database objects (it is derived from a lower level memory allocation class which caches objects, but the user need not be concerned about that). A dbObj is never created directly. Most access to dbObjs is at the derived class level.
Get the type of the object.
Get the print name of the object, e.g. "POLYGON".
Returns true if the object is an inst or an array.
Returns true if the object is a shape.
Returns true if the object is a viaInst.
Returns true if the object is a segment of some shape.
Returns true if the object is a vertex of some shape.
Sets the object's group
If the object is a member of a group, this returns the group, else returns null.
Add a property to a dbObject of the given type. If the property given by propName already exists, its value is updated to propVal.
Replace an existing property with one with a new value of a given type.
Get a property of a specified type by name.
Finds the type of a named property. propType is an enum with names stringType, integerType, floatType, booleanType, orientType.
Gets the object's property list as a Python list of prop objects. A prop object is a helper class with the following accessor methods:
char * prop::name()
Returns the name of the property.
prop::setName(char *name)
Sets the name of the property.
propType prop::type()
Returns the type of the property. This can be stringType, booleanType, integerType, floatType, listType or unknownType.
prop::setType(propType type)
Sets the type of the property.
union prop::data()
Returns the property value.
value.s is the string data value.i the integer data value,f the float data value.b the boolean data prop::setData(value)
Sets the property value. The function is overloaded for the common propType types.
Delete a property by name. Returns true if successful.
In Python, there is no means of casting a base class to a derived class. So for example if you use the cellView::dbGetOverlaps() function to get a list of objects, these are returned as dbObj class. So to facilitate conversion, there are a set of functions that convert a dbObj to a derived class e.g. rectangle.
arc * dbObj::toArc()
array * dbObj::toArray()
cell * dbObj::toCell()
cellView * dbObj::toCellView()
ellipse * dbObj::toEllipse()
group * dbObj::toGroup()
HSeg * dbObj::toHSeg()
inst * dbObj::toInst()
label * dbObj::toLabel()
line* dbObj::toLine()
path * dbObj::toPath()
polygon * dbObj::toPolygon()
rectangle * dbObj::toRectangle()
segment * dbObj::toSegment()
shape s = dbObj::toShape()
viaInst * dbObj::toViaInst()
view * dbObj::toView()
vertex * dbObj::.toVertex()
VSeg * dbObj::toVSeg()>
Getting bounding box coordinates. Note that you can only get the bounding box coordinates of shapes, insts or viaInsts.
Gets the specified bounding box coordinate.
Copyright © Peardrop Design 2024.