Page 1 of 1
classes
Posted: Mon Sep 10, 2007 2:33 pm
by koukla
Can you make your own classes to be used in template and/or hoc files similiar to how you can make your own classes in C++ ?
Posted: Mon Sep 10, 2007 10:52 pm
by ted
To define a new class, you write a "template." See chapter
13 Object-oriented programming
in The NEURON Book. Also read the following items in the Programmer's Reference:
ObjectOrientedProgramming
http://www.neuron.yale.edu/neuron/stati ... rogramming
Object Oriented Programming in OC
http://www.neuron.yale.edu/neuron/stati ... n/obj.html
A good way to develop definitions of cell classes suitable for use in networks is to use the
Network Builder to create a toy network, then click on its "Hoc file" button to make it write a
file that contains class definitions that are reusable in your own programs--see the Network
Builder tutorial at
http://www.neuron.yale.edu/neuron/docs
and the example in chapter
11 Modeling networks of The NEURON Book.