Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 A tour of the NEURON simulation environment
- 2 The modeling perspective
- 3 Expressing conceptual models in mathematical terms
- 4 Essentials of numerical methods for neural modeling
- 5 Representing neurons with a digital computer
- 6 How to build and use models of individual cells
- 7 How to control simulations
- 8 How to initialize simulations
- 9 How to expand NEURON's library of mechanisms
- 10 Synaptic transmission and artificial spiking cells
- 11 Modeling networks
- 12 hoc, NEURON's interpreter
- 13 Object-oriented programming
- 14 How to modify NEURON itself
- Appendix A1 Mathematical analysis of IntFire4
- Appendix A2 NEURON's built-in editor
- Epilogue
- Index
13 - Object-oriented programming
Published online by Cambridge University Press: 01 September 2010
- Frontmatter
- Contents
- Preface
- Acknowledgments
- 1 A tour of the NEURON simulation environment
- 2 The modeling perspective
- 3 Expressing conceptual models in mathematical terms
- 4 Essentials of numerical methods for neural modeling
- 5 Representing neurons with a digital computer
- 6 How to build and use models of individual cells
- 7 How to control simulations
- 8 How to initialize simulations
- 9 How to expand NEURON's library of mechanisms
- 10 Synaptic transmission and artificial spiking cells
- 11 Modeling networks
- 12 hoc, NEURON's interpreter
- 13 Object-oriented programming
- 14 How to modify NEURON itself
- Appendix A1 Mathematical analysis of IntFire4
- Appendix A2 NEURON's built-in editor
- Epilogue
- Index
Summary
Nevertheless, though of real knowledge there be little, yet of books there are a plenty;
Object orientation is in many ways a natural style of programming whose techniques are reinvented constantly by every programer (Coplien 1992). Object notation consolidates these techniques, so that much of the tedious programming necessary to use them is automatically handled by the interpreter. An object can be thought of as an abstract data type that is very useful in separating the idea of what a thing does from the details of the way it goes about doing it. Support for objects in hoc came late to NEURON, after the notion of cable sections, and as a consequence there are several types of variables (e.g. sections, mechanisms, range variables) that are clearly treated as objects from a conceptual point of view but grew up without a uniform syntax.
In hoc, an object is a collection of functions, procedures, and data, where the data defines the state of the object. There is just enough extra syntax in hoc to support a subset of the object-oriented programming paradigm: specifically, it supports information hiding and polymorphism, but not inheritance. Yet this subset is sufficient to greatly increase the user's ability to maintain conceptual control of complex programs.
- Type
- Chapter
- Information
- The NEURON Book , pp. 363 - 377Publisher: Cambridge University PressPrint publication year: 2006