/**************************************************************************	Channel.h													JJS 8/29/95			part of CONICAL, the Computational Neuroscience Class Library		A Channel is a type of Current whose voltage V is fixed, but whose	conductance G varies with time.  A Channel implements an active	channel; for a passive channel, you can simply use a Current.	Note that since a Channel needs a voltage to activate the channel,	it must be either attached to a Compartment, or separately attached	to a VSink and a VSource (see constructors below).  The former is	appropriate for a membrane channel; the latter would be appropriate	for (say) a synapse, whose conductance depends on presynaptic	voltage, but whose current affects the postsynaptic compartment.	Requires:		Current			-- base class		Stepper			-- base class		Compartment		-- source of V for channel activation		**************************************************************************/#ifndef CHANNEL_H#define CHANNEL_H#include "Current.h"#include "Stepper.h"#include "Cmprtmnt.h"class Channel : public Current, virtual public Stepper{  public:  	Channel( Compartment *pTo, real pMaxG=0.1 )					// constructor	: Current( pTo ), itsComp( pTo ), MaxG( pMaxG ) {}	Channel( VSink *pTo, VSource *pComp, real pMaxG=0.1 )		// constructor	: Current( pTo ), itsComp( pComp ), MaxG( pMaxG ) {}		virtual void Step( const real dt )		// update G	{ G = MaxG; }				// (default behavior is passive -- override here)	// public variables:		real MaxG;					// maximum conductance	  protected:	VSource *itsComp;			// compartment whose V affects our G	};#endif
