00001 #ifndef CInductor_HH 00002 #define CInductor_HH 00003 00004 #include <electro/CElement.hh> 00005 #include <vector> 00009 class CInductor : public CElementPasive 00010 { 00011 public: 00021 CInductor(std::string name,float l,int x=0,int y=0,int rot=0) : CElementPasive("IND",name,x,y,rot) { 00022 m_unitSymbol = "H"; 00023 m_valueSymbol = "L"; 00024 m_l=l; 00025 } 00030 ~CInductor(){} 00031 00037 void setL(float l){m_l=l;} 00043 float getL(void ){return m_l;} 00050 Complex getZc(double omega){return Complex(0,(omega*m_l));} 00057 Complex getYc(double omega){ 00058 if(omega!=0) 00059 return Complex(0,1/(omega*m_l)); 00060 else 00061 return Complex(0,MAX_DOUBLE); 00062 } 00063 00064 void draw(); 00065 protected: 00067 float m_l; 00068 }; 00069 00070 #endif