Package empro :: Module empro :: Class CircuitComponentList
[frames] | no frames]

Class CircuitComponentList

core.Updatable --+    
                 |    
   core.Selectable --+
                     |
                    CircuitComponentList

Manages the list of circuit components.

Class Hierarchy for CircuitComponentList
Class Hierarchy for CircuitComponentList

Instance Methods
 
__call__(x, ...)
x(...)
 
__contains__(x, y)
y in x
 
__delitem__(x, y)
del x[y]
 
__getitem__(x, y)
x[y]
 
__len__(x)
len(x)
 
__setitem__(x, i, y)
x[i]=y
bool
append(iComponent)
Appends a circuit component to the list.
None
appendList(iComponentList)
Appends a list of circuit components to the list.
CircuitComponent
at(iName)
Returns the circuit component by name.
None
clear()
Clear the list.
bool
contains(iComponentDef)
Determines if the circuit component is in the list.
int
getPortNumber(iName)
Returns the port number of the circuit component.
int
index(iComponent)
Retrieves the index of a circuit component.
bool
insert(iIndex, iComponent)
Inserts a circuit component into the list.
list{string}
names()
Returns the names of the circuit components in the list.
bool
remove(iIndex)
Removes a circuit component.
bool
replace(iIndex, iComponent)
Replaces a circuit component.
int
size()
Returns the size of the list.
None
swap(iIndex, iIndex)
Swaps two circuit components.

Inherited from core.Selectable: clone, isSelected

Inherited from core.Updatable: __enter__, __exit__, hash, isValid, reasonWhyInvalid

Properties

Inherited from core.Selectable: metaData, name, notes

Method Details

append(iComponent)

 

Appends a circuit component to the list.

Parameters:
Returns: bool

appendList(iComponentList)

 

Appends a list of circuit components to the list.

Parameters:
Returns: None

at(iName)

 

Returns the circuit component by name.

Parameters:
  • iName (string) - Name of the requested circuit component.
Returns: CircuitComponent

contains(iComponentDef)

 

Determines if the circuit component is in the list.

Parameters:
Returns: bool

getPortNumber(iName)

 

Returns the port number of the circuit component.

Parameters:
  • iName (string) - Name of the circuit component.
Returns: int

index(iComponent)

 

Retrieves the index of a circuit component.

Parameters:
Returns: int

insert(iIndex, iComponent)

 

Inserts a circuit component into the list.

Parameters:
  • iIndex (int) - Index of where to insert the new element.
  • iComponent (CircuitComponent) - Circuit component to add.
Returns: bool

remove(iIndex)

 

Removes a circuit component.

Parameters:
  • iIndex (int) - Index of the circuit component to remove.
Returns: bool

replace(iIndex, iComponent)

 

Replaces a circuit component.

Parameters:
  • iIndex (int) - Index of which element to replace.
  • iComponent (CircuitComponent) - Circuit component to add.
Returns: bool

swap(iIndex, iIndex)

 

Swaps two circuit components.

Parameters:
  • iIndex (int) - Index of the first circuit component.
  • iIndex (int) - Index of the second circuit component.
Returns: None