Attribute parsing and lookup. More...
Classes | |
class | MalformedAttributeError |
Raised when trying to parse a text object that is not recognized as an attribute. More... | |
Functions | |
def | parse_string |
Parse an attribute string of the form name=value into its name and value parts. More... | |
def | is_attribute |
Tell whether an object is a text object whose text constitutes a valid attribute. More... | |
def | inherited_objects |
Returns the toplevel objects of a component's symbol. More... | |
def | find_floating_attribs |
Return all floating attributes in the given revision. More... | |
def | find_attached_attribs |
Return the attributes directly attached to a net or component. More... | |
def | find_inherited_attribs |
Return the attributes inherited by a component via its symbol. More... | |
def | find_all_attribs |
Return all attributes, attached and inherited, of the specified component. More... | |
def | search |
Search a list of objects for attributes with a certain name and return their values. More... | |
def | search_floating |
Search the floating attributes in a revision for an attribute name and return matching values. More... | |
def | search_attached |
Search attributes attached to a net or component for an attribute name and return matching values. More... | |
def | search_inherited |
Search attributes inherited by a component for an attribute name and return matching values. More... | |
def | search_all |
Search both attached and inherited attributes of a component for an attribute name and return matching values. More... | |
def | find_pins_by_attribute |
Return all pins in a component with a particular attribute. More... | |
Attribute parsing and lookup.
An attribute is a normal text object with a string that is delimited by an equals sign ("="). The part before the equals sign is called name and the part of the string behind the equals sign is called value. Attributes can either be floating (that is, not attached to any object) or attached to a net (including pins and buses) or component.
In addition to its attached attributes, a component inherits the attributes which live as toplevel un-attached attributes inside the prim_objs
of its symbol.
def xorn.geda.attrib.find_all_attribs | ( | ob | ) |
def xorn.geda.attrib.find_attached_attribs | ( | ob | ) |
def xorn.geda.attrib.find_floating_attribs | ( | rev | ) |
def xorn.geda.attrib.find_inherited_attribs | ( | ob | ) |
def xorn.geda.attrib.find_pins_by_attribute | ( | ob, | |
name, | |||
value | |||
) |
def xorn.geda.attrib.inherited_objects | ( | ob | ) |
def xorn.geda.attrib.is_attribute | ( | ob | ) |
def xorn.geda.attrib.parse_string | ( | string | ) |
Parse an attribute string of the form name=value
into its name and value parts.
MalformedAttributeError | if the passed string is not a syntactically correct attribute string |
(name, value)
. def xorn.geda.attrib.search | ( | attribs, | |
name | |||
) |
def xorn.geda.attrib.search_all | ( | ob, | |
name | |||
) |
Search both attached and inherited attributes of a component for an attribute name and return matching values.
For nets, use search_attached instead.
KeyError | if the object doesn't exist |
ValueError | if the object isn't a component |
def xorn.geda.attrib.search_attached | ( | ob, | |
name | |||
) |
def xorn.geda.attrib.search_floating | ( | rev, | |
name | |||
) |
def xorn.geda.attrib.search_inherited | ( | ob, | |
name | |||
) |