classes action in panel count name save get out set
ms = new MechanismStandard("name")
name is a density mechanism such as hh or a point process
such as VClamp. A MechanismStandard instance, when created,
contains default values for all parameters associated with the mechanism.
In combination with the MechanismType class it is possible to create generic graphical interface widgets that are independent of the particular mechanism and parameter names.
objref ms1, ms2
ms1 = new MechanismStandard("hh")
ms2 = new MechanismStandard("AlphaSynapse")
ms2.set("gmax", .3)
ms1.panel()
ms2.panel()
MechanismStandard
ms.panel()
MechanismStandard
ms.action("statement")
create soma, axon, dend[3]
forsec "a" insert hh
forsec "d" insert pas
xpanel("Updated when MechanismStandard is changed")
xvalue("dend[0].g_pas")
xvalue("dend[1].g_pas")
xvalue("dend[2].g_pas")
xpanel()
objref ms
ms = new MechanismStandard("pas")
ms.action("change_pas()")
ms.panel()
proc change_pas() {
forall if(ismembrane("pas")) {
ms.out()
}
}
MechanismStandard
ms.in()ms.in(pointprocess)ms.in(mechanismstandard)ms.in()
ms.in(pointprocess)
ms.in(mechanismstandard)
MechanismStandard
ms.out()ms.out(pointprocess)ms.out(mechanismstandard)ms.out()
ms.out(pointprocess)
ms.out(mechanismstandard)
MechanismStandard
ms.set("varname", val)
MechanismStandard
val = ms.get("varname")
MechanismStandard
.save("name")
MechanismStandard
cnt = ms.count()
MechanismStandard
ms.name(strdef)size = ms.name(strdef, i)When the i parameter is present (i ranges from 0 to ms.count()-1) the strdef parameter gets assigned the ith name of the mechanism represented by the MechanismStandard. In addition the return value is the array size of that parameter (1 for a scalar).