00001 #ifndef CCurent_HH 00002 #define CCurent_HH 00003 00004 #include <electro/CElement.hh> 00005 #include <vector> 00006 00007 class CElement; 00008 class CElementActive; 00009 00013 class CCurent : public CElementActive 00014 { 00015 public: 00027 CCurent(std::string name,float i,double omega,double fi0,int x=0,int y=0,int rot=0) : CElementActive("CUR",name,omega,fi0,x,y,rot){ 00028 m_i=i; 00029 for(int i=0;i<2;i++) 00030 pins.push_back(new CPin()); 00031 m_unitSymbol = "A"; 00032 m_valueSymbol = "I"; 00033 } 00038 ~CCurent() { } 00044 float getI(void ){return m_i;} 00050 Complex getIc(void ){return Complex(m_i,m_fi0);} 00051 double getValue() {return getI();} 00057 void setI(float i){m_i=i;} 00058 void draw(); 00059 protected: 00061 float m_i; 00062 }; 00063 #endif