Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CElement Class Reference

Klasa reprezentuje pojedynczy element w ukladzie. More...

#include <CElement.hh>

Inheritance diagram for CElement:

CElementActive CElementControl CElementPasive CExNode CNode CCurent CVoltage CCurent_i CCurent_u CVoltage_i CVoltage_u CCapasistor CInductor CResistor List of all members.

Public Member Functions

 CElement (std::string symbol="", std::string name="", int x=0, int y=0, int rot=0)
 Konstruktor.
 ~CElement ()
 Destructor.
std::string getUnitSymbol ()
 Zwraca jednostke w postaci stringu.
virtual std::string getValueSymbol ()
 Zwraca symbol wartosci w postaci stringu.
virtual std::string getValueString ()
 Zwraca wartosc elementu w postaci stringu.
virtual double getValue ()
 Zwarca wartosc elementu.
std::string getType (void)
 Zwraca typ elementu.
std::string getName (void)
 Zwraca nazwe elementu.
int getX (void)
 Zwraca rzedna elementu.
int getY (void)
 Zwraca odcieta elementu.
int getRot (void)
 Zwraca rotacje elementu.
void setName (std::string name)
 Ustawia nazwe elementu.
void setX (int x)
 Ustawia rzedna elementu na schemacie.
void setY (int y)
 Ustawia odcieta elementu na schemacie.
void setRot (int rot)
 Ustawia rzedna elementu na schemacie.
bool conect (CElement *dest, unsigned int src_pin, unsigned int dest_pin)
 Polacz pin do innego elementu.
bool disconect (unsigned int src_pin)
 Rozlacza pin.
virtual void print ()
 Funkcja wypisuje podstawowe parametry elementu, storzona w celach testowych.
void print_conections ()
 Funkcja wypisuje polaczenia z innymi elementami, storzona w celach testowych.
virtual void draw ()
 Rysuje element.
void drawConnections ()
 Rysuje polaczenia danego elementu z sasiadami.
virtual void drawName ()
 Wyswietla nazwe elementu.
virtual void drawValue ()
 Wyswietla jego wartosc.
virtual int getPinX (int pinNumber)
 Zwraca wspolrzedna x pinu o podanym numerze.
virtual int getPinY (int pinNumber)
 Zwraca wspolrzedna y pinu o podanym numerze.
void setParent (CCircuit *parent)
 Ustawia obwod, do ktorego nalezy element.

Public Attributes

std::vector< CPin * > pins
 Wektor ktory przechowywuje wskazniki do pinow,.
CBranchbranch
 WTF ? nie mam pomyslu do jakiej galezi to moze byc wskaznik ;/.
CSignalsignal
 Wskaznik do sygnalu na danym elemencie.

Protected Member Functions

unsigned int m_max_pin ()
 Zwraca liczbe pinow danego elementu, (narazie zawsze =2);.

Protected Attributes

std::string m_name
 Nazwa elementu.
std::string m_symbol
 Symbol elementu.
std::string m_unitSymbol
 Symbol jednostki.
std::string m_valueSymbol
 Symbol wartosci elementu.
int m_x
 Rzedna elementu na schemacie.
int m_y
 Odcieta elementu na schemacie.
int m_rot
 Rotacja elementu na schemacie.
CCircuitm_ParentCircuit
 Wskaznik do obwod, do ktorego nalezy element.

Detailed Description

Klasa reprezentuje pojedynczy element w ukladzie.


Constructor & Destructor Documentation

CElement::CElement std::string  symbol = "",
std::string  name = "",
int  x = 0,
int  y = 0,
int  rot = 0
 

Konstruktor.

Parameters:
symbol typ elementu.
name nazwa.
x rzedna elementu na schemacie.
y odcieta elementu na schemacie.
rot rotacja elementu na schemacie, mozliwo¶ci : prawo(0), gora(1), lewo(2), dol(3). Pozostale wartosc sa rownowazne z rotacja prawa.
proportion a proportion of an arrow. This value is understood as the part of squareSize that will be the half of arrow's length.
See also:
~CElement();

CElement::~CElement  ) 
 

Destructor.

See also:
Element();


Member Function Documentation

bool CElement::conect CElement dest,
unsigned int  src_pin,
unsigned int  dest_pin
 

Polacz pin do innego elementu.

Parameters:
src_pin pin obecnego elementu
*dest wskaznik do elementu do ktorego ma byc nawiazane polaczenie
dest_pin pin w elemencie docelowym do ktorego mabyc nnaae polaczenie
See also:
disconect(unsigned int src_pin);

bool CElement::disconect unsigned int  src_pin  ) 
 

Rozlacza pin.

Parameters:
src_pin pin ktory mamy odlaczyc
See also:
conect(CElement *dest,unsigned int src_pin,unsigned int dest_pin);

void CElement::draw  )  [virtual]
 

Rysuje element.

Reimplemented in CCapasistor, CCurent, CCurent_i, CCurent_u, CNode, CInductor, CResistor, CVoltage, CVoltage_i, and CVoltage_u.

void CElement::drawConnections  ) 
 

Rysuje polaczenia danego elementu z sasiadami.

void CElement::drawName  )  [virtual]
 

Wyswietla nazwe elementu.

Reimplemented in CNode.

void CElement::drawValue  )  [virtual]
 

Wyswietla jego wartosc.

See also:
getValueString

getValue

Reimplemented in CNode.

std::string CElement::getName void   )  [inline]
 

Zwraca nazwe elementu.

Returns:
nazwa elementu
See also:
setName();

int CElement::getPinX int  pinNumber  )  [virtual]
 

Zwraca wspolrzedna x pinu o podanym numerze.

Parameters:
pinNumber 0 dla przodu, 1 dla tylu elementu`
Returns:
wspolrzedna x pinu

Reimplemented in CNode, CVoltage, CVoltage_i, and CVoltage_u.

int CElement::getPinY int  pinNumber  )  [virtual]
 

Zwraca wspolrzedna y pinu o podanym numerze.

Parameters:
pinNumber 0 dla przodu, 1 dla tylu elementu`
Returns:
wspolrzedna y pinu

Reimplemented in CNode, CVoltage, CVoltage_i, and CVoltage_u.

int CElement::getRot void   )  [inline]
 

Zwraca rotacje elementu.

Returns:
rotacja elementu
See also:
getY(); getX(); setX(); setY(); setRot();

std::string CElement::getType void   )  [inline]
 

Zwraca typ elementu.

Returns:
typ elementu

std::string CElement::getUnitSymbol  )  [inline]
 

Zwraca jednostke w postaci stringu.

Returns:
jednostka m_unitSymbol elementu w postaci lancucha znakow.
See also:
m_unitSymbol

virtual double CElement::getValue  )  [inline, virtual]
 

Zwarca wartosc elementu.

Dla rezystora opornosc R, dla cewki indukcje L, dla kondensatora pojemnosc C, etc. Jesli nie mozna zwrocic wartosci (np nie ma czego zwaracac) zwracane jest zero.

Returns:
wartosc wielkosci charakteryzujacej element

Reimplemented in CCapasistor, CCurent, CResistor, and CVoltage.

std::string CElement::getValueString  )  [virtual]
 

Zwraca wartosc elementu w postaci stringu.

Returns:
wartosc razem z jednostkami. Dla sterowanych odpowiedni string.
See also:
getValue

Reimplemented in CElementControl.

virtual std::string CElement::getValueSymbol  )  [inline, virtual]
 

Zwraca symbol wartosci w postaci stringu.

Returns:
symbol wartosci w postaci lancucha znakow.
See also:
m_unitSymbol

int CElement::getX void   )  [inline]
 

Zwraca rzedna elementu.

Returns:
rzedna elementu
See also:
getY(); getRot(); setX(); setY(); setRot();

int CElement::getY void   )  [inline]
 

Zwraca odcieta elementu.

Returns:
odcieta elementu
See also:
getX(); getRot(); setX(); setY(); setRot();

unsigned int CElement::m_max_pin  )  [inline, protected]
 

Zwraca liczbe pinow danego elementu, (narazie zawsze =2);.

virtual void CElement::print  )  [inline, virtual]
 

Funkcja wypisuje podstawowe parametry elementu, storzona w celach testowych.

void CElement::print_conections  ) 
 

Funkcja wypisuje polaczenia z innymi elementami, storzona w celach testowych.

void CElement::setName std::string  name  )  [inline]
 

Ustawia nazwe elementu.

Parameters:
name nowa nazwa
See also:
getName();

void CElement::setParent CCircuit parent  )  [inline]
 

Ustawia obwod, do ktorego nalezy element.

void CElement::setRot int  rot  )  [inline]
 

Ustawia rzedna elementu na schemacie.

Parameters:
rot nowa rotacja, mozliwo¶ci : prawo(0), gora(1), lewo(2), dol(3). Pozostale wartosc sa rownowazne z rotacja prawa.
See also:
getX(); getY(); getRot(); setX(); setY();

void CElement::setX int  x  )  [inline]
 

Ustawia rzedna elementu na schemacie.

Parameters:
x nowa rzedna
See also:
getX(); getY(); getRot(); setY(); setRot();

void CElement::setY int  y  )  [inline]
 

Ustawia odcieta elementu na schemacie.

Parameters:
y nowa odcieta
See also:
getX(); getY(); getRot(); setX(); setRot();


Member Data Documentation

CBranch* CElement::branch
 

WTF ? nie mam pomyslu do jakiej galezi to moze byc wskaznik ;/.

std::string CElement::m_name [protected]
 

Nazwa elementu.

CCircuit* CElement::m_ParentCircuit [protected]
 

Wskaznik do obwod, do ktorego nalezy element.

int CElement::m_rot [protected]
 

Rotacja elementu na schemacie.

std::string CElement::m_symbol [protected]
 

Symbol elementu.

std::string CElement::m_unitSymbol [protected]
 

Symbol jednostki.

Dla opornika "Ohm", dla kondensatora "F", dla cewki "H", etc.

std::string CElement::m_valueSymbol [protected]
 

Symbol wartosci elementu.

Dla opornika "R", dla kondensatora "C", dla cewki "L", etc.

int CElement::m_x [protected]
 

Rzedna elementu na schemacie.

int CElement::m_y [protected]
 

Odcieta elementu na schemacie.

std::vector<CPin *> CElement::pins
 

Wektor ktory przechowywuje wskazniki do pinow,.

CSignal* CElement::signal
 

Wskaznik do sygnalu na danym elemencie.


The documentation for this class was generated from the following files:
Generated on Sun Jan 16 11:05:57 2005 for RolLerCoaster by  doxygen 1.3.9.1