8 #include "IonChannel.h"
18 #include "ClassFactory.h"
57 if(strType ==
"CURRENT")
59 else if(strType ==
"VOLTAGECLAMP")
65 THROW_PARAM_ERROR(Al_Err_lInvalidExternalStimulusType, Al_Err_strInvalidExternalStimulusType,
"ExternalStimulusType", strType);
70 catch(CStdErrorInfo oError)
72 if(lpStimulus)
delete lpStimulus;
78 if(lpStimulus)
delete lpStimulus;
79 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
92 NeuralModule *lpModule=NULL;
98 if(strType ==
"INTEGRATEFIRESIMMODULE")
104 THROW_PARAM_ERROR(Al_Err_lInvalidNeuralModuleType, Al_Err_strInvalidNeuralModuleType,
"NeuralModule", strType);
109 catch(CStdErrorInfo oError)
111 if(lpModule)
delete lpModule;
117 if(lpModule)
delete lpModule;
118 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
132 DataColumn *lpColumn=NULL;
146 THROW_PARAM_ERROR(Al_Err_lInvalidDataColumnType, Al_Err_strInvalidDataColumnType,
"DataColumnType", strType);
151 catch(CStdErrorInfo oError)
153 if(lpColumn)
delete lpColumn;
159 if(lpColumn)
delete lpColumn;
160 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
180 if(strType ==
"IONCHANNELSIGMOID")
186 THROW_PARAM_ERROR(Al_Err_lInvalidGainType, Al_Err_strInvalidGainType,
"GainType", strType);
191 catch(CStdErrorInfo oError)
193 if(lpGain)
delete lpGain;
199 if(lpGain)
delete lpGain;
200 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
220 if(strType ==
"NEURON")
226 THROW_PARAM_ERROR(Rn_Err_lInvalidNeuronType, Rn_Err_strInvalidNeuronType,
"NeuronType", strType);
231 catch(CStdErrorInfo oError)
233 if(lpNeuron)
delete lpNeuron;
239 if(lpNeuron)
delete lpNeuron;
240 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
260 if(strType ==
"SYNAPSE")
266 THROW_PARAM_ERROR(Rn_Err_lInvalidSynapseType, Rn_Err_strInvalidSynapseType,
"SynapseType", strType);
271 catch(CStdErrorInfo oError)
273 if(lpSynapse)
delete lpSynapse;
279 if(lpSynapse)
delete lpSynapse;
280 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
299 if(strType ==
"SPIKINGCHEMICAL")
301 else if(strType ==
"NONSPIKINGCHEMICAL")
303 else if(strType ==
"ELECTRICAL")
307 lpSynapseType = NULL;
309 THROW_PARAM_ERROR(Rn_Err_lInvalidSynapseType, Rn_Err_strInvalidSynapseType,
"SynapseType", strType);
312 return lpSynapseType;
314 catch(CStdErrorInfo oError)
316 if(lpSynapseType)
delete lpSynapseType;
322 if(lpSynapseType)
delete lpSynapseType;
323 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
342 if(strType ==
"IONCHANNEL")
348 THROW_PARAM_ERROR(Rn_Err_lInvalidIonChannelType, Rn_Err_strInvalidIonChannelType,
"IonChannel", strType);
353 catch(CStdErrorInfo oError)
355 if(lpChannel)
delete lpChannel;
361 if(lpChannel)
delete lpChannel;
362 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
372 CStdSerialize *ClassFactory::CreateObject(std::string strClassType, std::string strObjectType,
bool bThrowError)
378 if(strClassType ==
"EXTERNALSTIMULUS")
380 else if(strClassType ==
"NEURALMODULE")
382 else if(strClassType ==
"DATACOLUMN")
384 else if(strClassType ==
"GAIN")
385 lpObject =
CreateGain(strObjectType, bThrowError);
386 else if(strClassType ==
"NEURON")
388 else if(strClassType ==
"SYNAPSE")
390 else if(strClassType ==
"SYNAPSETYPE")
392 else if(strClassType ==
"IONCHANNEL")
398 THROW_PARAM_ERROR(Std_Err_lInvalidClassType, Std_Err_strInvalidClassType,
"ClassType", strClassType);
Spiking chemical synapse type.
Declares the integrate fire module class.
Integrate and fire neural module.
Ion channel sigmoid gain.
Declares the connexion class.
Integrate and fire neuron model.
virtual ExternalStimulus * CreateExternalStimulus(std::string strType, bool bThrowError=true)
Creates an external stimulus.
virtual IonChannel * CreateIonChannel(std::string strType, bool bThrowError=true)
Creates an ion channel.
virtual SynapseType * CreateSynapseType(std::string strType, bool bThrowError=true)
Creates a synapse type.
Declares the spiking chemical synapse class.
std::string Std_Trim(std::string strVal)
Trims a string.
Declares the ca activation class.
virtual Connexion * CreateSynapse(std::string strType, bool bThrowError=true)
Creates a synapse.
virtual ~ClassFactory()
Destructor.
Current stimulus for neural items.
Declares the synapse type class.
virtual Neuron * CreateNeuron(std::string strType, bool bThrowError=true)
Creates a neuron.
virtual DataColumn * CreateDataColumn(std::string strType, bool bThrowError=true)
Creates a data column.
virtual NeuralModule * CreateNeuralModule(std::string strType, bool bThrowError=true)
Creates a neural module.
ClassFactory()
Default constructor.
Declares the electrical synapse class.
virtual Gain * CreateGain(std::string strType, bool bThrowError=true)
Creates a gain.
Declares the ion channel sigmoid class.
std::string Std_ToUpper(std::string strVal)
Converts a string to upper case.
Non-spiking chemical synapse type.
Contains all of the classes to implement a basic integrate and fire neural model. ...
Declares the non spiking chemical synapse class.
Declares the neuron class.