00001 /*************************************************************************** 00002 * Copyright (C) 2003-2004 by David Saxton * 00003 * david@bluehaze.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #ifndef VCCS_H 00012 #define VCCS_H 00013 00014 #include "element.h" 00015 00023 // TODO: help section for schematic so user knows which pins to use. 00024 00025 // FIXME: Should not create a current where there's no voltage????? 00026 00027 class VCCS : public Element 00028 { 00029 public: 00030 VCCS( const double gain ); 00031 virtual ~VCCS(); 00032 00033 virtual Type type() const { return Element_VCCS; } 00034 void setGain( const double g ); 00035 virtual void add_map(); 00036 00037 protected: 00038 virtual void updateCurrents(); 00039 virtual void add_initial_dc(); 00040 00041 private: 00042 double m_g; // Conductance 00043 }; 00044 00045 #endif
1.5.1