Logo Search packages:      
Sourcecode: ktechlab version File versions

Circuit Class Reference

#include <circuit.h>

List of all members.

Detailed Description

Simulates a collection of components.

Usage of this class (usually invoked from CircuitDocument): (1) Add Wires, Pins and Elements to the class as appropriate (2) Call init to initialize the simulation (3) Control the simulation with step()

This class can be considered a bridge between the gui-tainted CircuitDocument - specific to this implementation, and the pure untainted ElementSet. Please keep it that way.

David Saxton

Definition at line 54 of file circuit.h.

Public Member Functions

void addElement (Element *element)
void addPin (Pin *node)
bool canAddChanged () const
bool contains (Pin *node)
bool containsNonLinear () const
void createMatrixMap ()
void displayEquations ()
void doLogic ()
void doNonLogic ()
void init ()
void initCache ()
CircuitnextChanged (unsigned char chain) const
void setCacheInvalidated ()
void setCanAddChanged (bool canAdd)
void setNextChanged (Circuit *circuit, unsigned char chain)
void updateCurrents ()

Static Public Member Functions

static int identifyGround (PinList nodeList, int *highest=0l)

Protected Member Functions

void cacheAndUpdate ()
void stepReactive ()
void updateNodalVoltages ()

Static Protected Member Functions

static bool recursivePinAdd (Pin *node, PinList *unassignedNodes, PinList *associated, PinList *nodes)

Protected Attributes

bool m_bCanAddChanged
bool m_bCanCache
int m_branchCount
int m_cnodeCount
ElementList m_elementList
unsigned m_logicOutCount
PinList m_pinList
LogicCacheNode * m_pLogicCacheBase
LogicOut ** m_pLogicOut
Circuitm_pNextChanged [2]
int m_prepNLCount

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index