MechanismType

classes
   action         is_netcon_target  remove      
   count          make           select         
   has_net_event  menu           selected       

SYNTAX

mt = new MechanismType(0)
mt = new MechanismType(1)

DESCRIPTION

Provides a way of iterating over all membrane mechanisms or point processes and allows selection via a menu or under hoc control.

The 0 argument creates a list of all available distributed membrane mechanisms (as opposed to PointProcesses). eg "hh", "pas", "extracellular". that can be inserted into a section.

The 1 argument creates a list of all available Point Processes. eg. IClamp, AlphaSynapse, VClamp.

Mechanism order is the same as the argument order that created the "special" during nrnivmodl or mknrndll. Therefore when a saved session depends on information in a MechanismType it is dependent on a particular special or dll.

EXAMPLES

execute following example
objref mt
//Print the names of all density mechanisms
mt = new MechanismType(0)
strdef mname
for i=0, mt.count()-1 {
	mt.select(i)
	mt.selected(mname)
	print mname
}

SEE ALSO

MechanismStandard


select

MechanismType

SYNTAX

mt.select("name")
mt.select(i)

DESCRIPTION

selects either the named mechanism or the i'th mechanism in the list.


selected

MechanismType

SYNTAX

i = mt.selected([strdef])

DESCRIPTION

returns the index of the current selection. If present, strarg is assigned to the name of the current selection.


remove

MechanismType

SYNTAX

mt.remove()

DESCRIPTION

For distributed mechanisms invoked with the "insert" statement. Deletes selected mechanism from currently accessed section. A nop if the mechanism is not in the section.


make

MechanismType

SYNTAX

mt.make()
mt.make(objectvar)

DESCRIPTION

mt.make()
For distributed mechanisms. Inserts selected mechanism into currently accessed section.
mt.make(objectvar)
For point processes. The arg becomes a reference to a new point process of type given by the selection. Note that the newly created point process is not located in any section. Note that if objectvar was the only reference to another object then that object is destroyed.


count

MechanismType

SYNTAX

i = mt.count()

DESCRIPTION

The number of different mechanisms in the list.


menu

MechanismType

SYNTAX

mt.menu()

DESCRIPTION

Inserts a special menu into the currently open xpanel. The menu label always reflects the current selection. Submenu items are indexed according to position with the first item being item 0. When the mouse button is released on a submenu item that item becomes the selection and the action (if any) is executed.


action

MechanismType

SYNTAX

mt.action("command")

DESCRIPTION

The action to be executed when a submenu item is selected.


is_netcon_target

MechanismType

SYNTAX

boolean = mt.is_netcon_target(i)

DESCRIPTION

The i'th point process has a NET_RECEIVE block and can therefore be a target for a NetCon object.


has_net_event

MechanismType

SYNTAX

boolean = mt.has_net_event(i)

DESCRIPTION

The i'th point process has a net_event call in its NET_RECEIVE block and can therefore be a source for a NetCon object. This means it is NetCon stimulator or that the point process can be used as an artificial neural network cell.


neuron/neuron/classes/mechtype.hel : 2987 Mar 31