CSIM: csimClass Class Reference

csimClass Class Reference

#include <csimclass.h>

Inheritance diagram for csimClass:

Advancable Algorithm csimRecorder FilterFunction Forceable IonChannel IonGate PhysicalModel Preprocessor Readout Synapse Teacher List of all members.

Detailed Description

Base class of all classes in CSIM.

It provides the facilities to set/get class member variables specified by a string or Id. Class member variables (attributes) which can be get/set by means of the methods provided by csimClass will be called fiels. See Setting and getting field values

Classes derived from csimClass will have additional fields/parameters. We decided to make these public to avoid to define seperate set and get methods for each parameter (knowing to act against the philosophy of object oriented programming).

Public Member Functions

  • virtual int init (Advancable *)
    Called only once directly after an object is created from Matlab via csim('create',className);.
  • int setFieldByName (char *o, char *name, double *v)
    Sets the field given by name to the values specified by v.
  • int setFieldById (char *o, int id, double *v)
    Sets the field given by its integer Id to the values specified by v.
  • int getFieldByName (char *o, char *name, double *v)
    Gets the value(s) of a field given by its name; v must point to a sufficiently large memory block.
  • int getFieldById (char *o, int id, double *v)
    Gets the value(s) of a field given by its integer Id; v must point to a sufficiently large memory block.
  • int getFieldSizeByName (char *o, char *name)
    Get the size (number of doubles) of the field specified by name.
  • int getFieldSizeById (char *o, int id)
    Get the size (number of doubles) of the field specified by Id.
  • void printFields (char *o)
    Display the values of all fields of the object (with units).
  • double * getFieldArray (char *o)
    Allocate and get a vector of doubles containing the values of all read/writeable fields.
  • int setFieldArray (char *o, double *p)
    Set all read/writeable fields given in an array of doubles containing the values of all the fields.
  • int getFieldArraySize (void)
    Returns the size of the array returned by getFieldArray().
  • int getFieldId (char *name)
    Get the Id of a field given its name.
  • const char * getFieldName (int fId)
    Get the name of a field given its Id.
  • int classId (void)
    Return the Id of the class the object belongs to.
  • const char * className (void)
    Return the name of the class the object belongs to.
  • int getId (void)
    Get the unique Id of the object.
  • virtual csimClassInfo * getClassInfo (void)
    Wrapper function to get the correct value of classInfo.
  • int fieldChangeNotify (bool force=0)
    Notify the object that some fields have been changed.
  • virtual int updateInternal (void)
    Update internal variables.

Protected Member Functions

Private Attributes

  • int Id
    The unique Id of the object.
  • bool dirty
    True if internal variables/states of an objact are inconsistent with the current values of the fields.

Static Private Attributes

  • static csimClassInfo * classInfo = 0
    A pointer per class which points to the (field) information about this class.

Friends


Member Function Documentation

int csimClass::fieldChangeNotify bool  force = 0  )  [inline]
 

Notify the object that some fields have been changed.

This function will be called when we have to make sure that all the internal variables/states of an objact are consistent with the current values of the fields.

virtual int csimClass::updateInternal void   )  [inline, virtual]
 

Update internal variables.

This function has to make sure that all the internal variables/states of an object are consistent with the current values of the fields.

Reimplemented in Algorithm, AlphaSpikeFilter, AnalogFilter, ArmModel, ConcIonGate, CountSpikeFilter, ExpSpikeFilter, FilterFunction, GVD_Gate, GVD_cT_Gate, IfbNeuron, IonGate, Izhi_Neuron, LifBurstNeuron, LifNeuron, LifNeuronSynchan, PhysicalModel, Preprocessor, TraubsHHNeuron, UserAnalogFilter, and VIonGate.


Member Data Documentation

bool csimClass::dirty [private]
 

True if internal variables/states of an objact are inconsistent with the current values of the fields.

Set to true if fields are changed via setFieldById, setFieldByName, or setFieldArray. Set to 0 after a successful call to updateInternal.

int csimClass::Id [private]
 

The unique Id of the object.

It is set if the object is inserted into the Network.


 
(C) 2003, Thomas Natschläger last modified 07/10/2006