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

CVoltage.hh

Go to the documentation of this file.
00001 #ifndef CVoltage_HH
00002 #define CVoltage_HH
00003 
00004 #include <electro/CElement.hh>
00005 #include <vector>
00006 class CElement;
00007 class CElementActive;
00011 class CVoltage : public CElementActive
00012 {
00013 public:
00025     CVoltage(std::string name,float u,double omega,double fi0,int x=0,int y=0,int rot=0) : CElementActive("VOL",name,omega,fi0,x,y,rot){
00026          m_u=u;
00027          for(int i=0;i<2;i++)
00028             pins.push_back(new CPin());
00029          m_unitSymbol  = "V";
00030          m_valueSymbol = "U";
00031     }
00036     ~CVoltage(){}
00042     float getU(void ){return m_u;}
00048     Complex getUc(void ){return Complex(m_u,m_fi0);}
00049     double getValue() {return getU();}
00055     void setU(float u){m_u=u;}
00056     void draw();
00057 
00058     // TODO: change these functions to one that returns Glib::Point.
00059     int getPinX(int pinNumber);
00060     int getPinY(int pinNumber);
00061 protected: 
00063     float m_u;
00064 };
00065 #endif
00066 

Generated on Sun Jan 16 11:05:56 2005 for RolLerCoaster by  doxygen 1.3.9.1