#include <FieldElementFinfo.h>
Public Member Functions | |
FieldElementFinfoBase (const string &name, const string &doc, const Cinfo *fieldCinfo, bool deferCreate) | |
virtual | ~FieldElementFinfoBase () |
void | registerFinfo (Cinfo *c) |
bool | strSet (const Eref &tgt, const string &field, const string &arg) const |
bool | strGet (const Eref &tgt, const string &field, string &returnValue) const |
void | postCreationFunc (Id parent, Element *parentElm) const |
virtual char * | lookupField (char *parent, unsigned int fieldIndex) const =0 |
virtual void | setNumField (char *parent, unsigned int num) const =0 |
virtual func to resize Field array, using char* for parent | |
virtual unsigned int | getNumField (const char *parent) const =0 |
virtual func to get size of Field array, using char* for parent | |
Protected Attributes | |
DestFinfo * | setNum_ |
DestFinfo * | getNum_ |
const Cinfo * | fieldCinfo_ |
bool | deferCreate_ |
This class sets up fields that should be accessed as independent FieldElements. These fields are typically complex ones with several sub-fields, and are also typically arranged in an array. Examples are Synapses on an IntFire Neuron.
The creation of this one Finfo sets up three things: First, the information for the FieldElement that will handle the class. Second, the set and get functions for the size of the array of Fields. Third, an automatic creation of the FieldElement whenever an Element of the Parent class is made. This defaults to a child, but can be moved.
FieldElementFinfoBase::FieldElementFinfoBase | ( | const string & | name, | |
const string & | doc, | |||
const Cinfo * | fieldCinfo, | |||
bool | deferCreate | |||
) | [inline] |
virtual FieldElementFinfoBase::~FieldElementFinfoBase | ( | ) | [inline, virtual] |
virtual unsigned int FieldElementFinfoBase::getNumField | ( | const char * | parent | ) | const [pure virtual] |
virtual func to get size of Field array, using char* for parent
Implemented in FieldElementFinfo< T, F >.
Referenced by FieldElement::numField().
virtual char* FieldElementFinfoBase::lookupField | ( | char * | parent, | |
unsigned int | fieldIndex | |||
) | const [pure virtual] |
virtual function to look up pointer for Field object. This casts everything down to chars so that the FieldElement can use it.
Implemented in FieldElementFinfo< T, F >.
Referenced by FieldElement::data().
Virtual function, defined in Finfo.h and overridden here.
Reimplemented from Finfo.
References Finfo::addMsg(), deferCreate_, Id::element(), Id::eref(), fieldCinfo_, Cinfo::findFinfo(), Element::getName(), Finfo::initCinfo(), Msg::mid(), Finfo::name(), and Id::nextId().
void FieldElementFinfoBase::registerFinfo | ( | Cinfo * | c | ) | [inline, virtual] |
Returns string-ified form to handle template expectations for name field string getName() const; Assign function Ids, bindIndex and so on.
Implements Finfo.
References getNum_, Cinfo::registerFinfo(), Cinfo::registerPostCreationFinfo(), and setNum_.
virtual void FieldElementFinfoBase::setNumField | ( | char * | parent, | |
unsigned int | num | |||
) | const [pure virtual] |
virtual func to resize Field array, using char* for parent
Implemented in FieldElementFinfo< T, F >.
Referenced by FieldElement::resizeField().
bool FieldElementFinfoBase::strGet | ( | const Eref & | tgt, | |
const string & | field, | |||
string & | returnValue | |||
) | const [inline, virtual] |
Function to return value of field into a string argument. Returns true on success. Normally called only from SetGet::strGet.
Implements Finfo.
bool FieldElementFinfoBase::strSet | ( | const Eref & | tgt, | |
const string & | field, | |||
const string & | arg | |||
) | const [inline, virtual] |
Function to set this field using a string argument. Returns true on success. Normally called only from SetGet::strSet.
Implements Finfo.
bool FieldElementFinfoBase::deferCreate_ [protected] |
Referenced by postCreationFunc().
const Cinfo* FieldElementFinfoBase::fieldCinfo_ [protected] |
Referenced by postCreationFunc().
DestFinfo* FieldElementFinfoBase::getNum_ [protected] |
Referenced by FieldElementFinfo< T, F >::FieldElementFinfo(), registerFinfo(), and ~FieldElementFinfoBase().
DestFinfo* FieldElementFinfoBase::setNum_ [protected] |
Referenced by FieldElementFinfo< T, F >::FieldElementFinfo(), registerFinfo(), and ~FieldElementFinfoBase().