Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

void Component::removeElement ( Element element,
bool  setPinsInterIndependent 
) [inherited]

Safely delete an element - in this case, calls element->componentDeleted, and removes it from the element list.

setPinsInterIndependent whether to call setPinsInterIndependent. The call is time-consuming, and unnecessary if the pins from which the element was originally attached will be/ were removed, or they will become interdependent again.

Definition at line 118 of file component.cpp.

References Element::componentDeleted(), Component::elementDestroyed(), Component::m_elementMapList, and Component::rebuildPinInterDepedence().

Referenced by ResistorDIP::initPins(), Multiplexer::initPins(), Demultiplexer::initPins(), DAC::initPins(), ADC::initPins(), and Switch::stopBouncing().

    if (!element)

    emit elementDestroyed(element);

    const ElementMapList::iterator end = m_elementMapList.end();
    for ( ElementMapList::iterator it = m_elementMapList.begin(); it != end; )
        ElementMapList::iterator next = it;

        if ( (*it).e == element )

        it = next;

    if ( setPinsInterIndependent )

Generated by  Doxygen 1.6.0   Back to index