Wire Class Reference

#include <wire.h>

List of all members.

Public Member Functions

 Wire (Pin *startPin, Pin *endPin)
 ~Wire ()
bool calculateCurrent ()
bool currentIsKnown () const
void setCurrentKnown (bool known)
double current () const
double voltage () const
PinstartPin () const
PinendPin () const

Protected Attributes

double m_current
bool m_bCurrentIsKnown
QGuardedPtr< Pinm_pStartPin
QGuardedPtr< Pinm_pEndPin


Detailed Description

Author:
David Saxton

Definition at line 22 of file wire.h.


Member Function Documentation

bool Wire::calculateCurrent (  ) 

Attempts to calculate the current that is flowing through the connector. Returns true if successfuly, otherwise returns false

Definition at line 37 of file wire.cpp.

References m_bCurrentIsKnown, m_current, m_pEndPin, and m_pStartPin.

bool Wire::currentIsKnown (  )  const [inline]

Returns true if the current flowing through the connector is known

Definition at line 36 of file wire.h.

References m_bCurrentIsKnown.

void Wire::setCurrentKnown ( bool  known  ) 

Set whether the actual current flowing into this node is known (in some cases - such as this node being ground - it is not known, and so the value returned by current() cannot be relied on.

Definition at line 125 of file wire.cpp.

References m_bCurrentIsKnown, and m_current.

double Wire::current (  )  const [inline]

Returns the current flowing through the connector. This only applies for electronic connectors

Definition at line 47 of file wire.h.

References m_current.

double Wire::voltage (  )  const

Returns the voltage at the connector. This is an average of the voltages at either end.

Definition at line 117 of file wire.cpp.

References m_pEndPin, and m_pStartPin.


The documentation for this class was generated from the following files:
Generated on Tue May 8 17:06:01 2007 for KTechLab by  doxygen 1.5.1