#include <Cinfo.h>
Public Member Functions | |
Cinfo (const std::string &name, const Cinfo *baseCinfo, Finfo **finfoArray, unsigned int nFinfos, DinfoBase *d, const string *doc=0, unsigned int numDoc=0, bool banCreation=false) | |
Cinfo () | |
Cinfo (const Cinfo &other) | |
~Cinfo () | |
void | init (Finfo **finfoArray, unsigned int nFinfos) |
void | registerFinfo (Finfo *f) |
FuncId | registerOpFunc (const OpFunc *f) |
void | overrideFunc (FuncId fid, const OpFunc *f) |
BindIndex | registerBindIndex () |
void | postCreationFunc (Id newId, Element *newElm) const |
void | registerPostCreationFinfo (const Finfo *f) |
bool | banCreation () const |
const OpFunc * | getOpFunc (FuncId fid) const |
const std::string & | name () const |
const Cinfo * | baseCinfo () const |
const Finfo * | findFinfo (const string &name) const |
unsigned int | numBindIndex () const |
const map< string, Finfo * > & | finfoMap () const |
const DinfoBase * | dinfo () const |
bool | isA (const string &ancestor) const |
void | reportFids () const |
string | getDocs () const |
string | getBaseClass () const |
Finfo * | getSrcFinfo (unsigned int i) const |
unsigned int | getNumSrcFinfo () const |
Finfo * | getDestFinfo (unsigned int i) const |
unsigned int | getNumDestFinfo () const |
Finfo * | getValueFinfo (unsigned int i) const |
unsigned int | getNumValueFinfo () const |
Finfo * | getLookupFinfo (unsigned int i) const |
unsigned int | getNumLookupFinfo () const |
Finfo * | getSharedFinfo (unsigned int i) |
unsigned int | getNumSharedFinfo () const |
Finfo * | getFieldElementFinfo (unsigned int i) const |
unsigned int | getNumFieldElementFinfo () const |
void | setNumFinfo (unsigned int v) |
const string & | srcFinfoName (BindIndex bid) const |
const string & | destFinfoName (FuncId fid) const |
Static Public Member Functions | |
static const Cinfo * | find (const std::string &name) |
static void | makeCinfoElements (Id parent) |
static void | rebuildOpIndex () |
static const Cinfo * | initCinfo () |
Class to manage class information for all the other classes.
Cinfo::Cinfo | ( | const std::string & | name, | |
const Cinfo * | baseCinfo, | |||
Finfo ** | finfoArray, | |||
unsigned int | nFinfos, | |||
DinfoBase * | d, | |||
const string * | doc = 0 , |
|||
unsigned int | numDoc = 0 , |
|||
bool | banCreation = false | |||
) |
The Cinfo intializer is used for static initialization of all the MOOSE Cinfos. Each MOOSE class must set up a function to build its Cinfo. This function must be called statically in the MOOSE class .cpp file. Note how it takes the base *Cinfo as an argument. This lets us call the base Cinfo initializer when making each Cinfo class, thus ensuring the correct static initialization sequence, despite the somewhat loose semantics for this sequence in most C++ compilers.
Cinfo::Cinfo | ( | ) |
This initializer is used only as a dummy, to keep Dinfo happy
Cinfo::~Cinfo | ( | ) |
bool Cinfo::banCreation | ( | ) | const |
True if this class should never be instantiated in MOOSE. This may happen if it is a pure virtual class, or if this Cinfo is for a FieldElement which cannot be created in isolation but only as a child of another class.
const Cinfo * Cinfo::baseCinfo | ( | ) | const |
Referenced by DestFinfo::registerFinfo().
const string & Cinfo::destFinfoName | ( | FuncId | fid | ) | const |
Returns the name of the DestFinfo having the specified FuncId, on this Cinfo. Returns "" on failure.
References destFinfoName(), DestFinfo::getFid(), and Finfo::name().
Referenced by destFinfoName(), Msg::getDestFieldsOnE1(), and Msg::getDestFieldsOnE2().
const DinfoBase * Cinfo::dinfo | ( | ) | const |
Returns the Dinfo, which manages creation and destruction of the data, and knows about its size.
Referenced by buildFinfoElement(), DataElement::DataElement(), initCinfo(), makeCinfoElements(), DataElement::resize(), DataElement::zombieSwap(), and DataElement::~DataElement().
const Cinfo * Cinfo::find | ( | const std::string & | name | ) | [static] |
Finds the Cinfo with the specified name.
Referenced by Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), Stoich::setEnzK1(), Stoich::setReacKb(), Stoich::setReacKf(), ZombieEnz::setSolver(), testSyncSynapseSize(), Stoich::unZombifyModel(), and Stoich::unZombifyPools().
const Finfo* Cinfo::findFinfo | ( | const string & | name | ) | const |
Finds Finfo by name in the list for this class, ignoring any element-specific fields. Returns 0 on failure.
Referenced by Shell::adopt(), convertConcToNumRateUsingMesh(), enzDest(), findMeshOfEnz(), findParentComptOfReac(), getSlaveEnable(), innerCopyMsgs(), Shell::innerMove(), Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), Neutral::isDescendant(), localGet(), Neutral::parent(), Neutral::path(), FieldElementFinfoBase::postCreationFunc(), DestFinfo::registerFinfo(), Stoich::setEnzK1(), Stoich::setReacKb(), Stoich::setReacKf(), ZombieMMenz::setSolver(), ZombieEnz::setSolver(), Element::setTick(), HSolveUtils::targets(), testAssortedMsg(), testCreateMsg(), testFibonacci(), testFinfoFields(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSendSpike(), testSharedMsg(), testShellAddMsg(), testSparseMsg(), testSyncSynapseSize(), tryParent(), and FieldElement::zombieSwap().
const map< string, Finfo * > & Cinfo::finfoMap | ( | ) | const |
Returns the map between name and field info
Referenced by Element::showFields(), and Element::showMsg().
string Cinfo::getBaseClass | ( | ) | const |
Return the name of the base class
References name().
Referenced by initCinfo().
Finfo * Cinfo::getDestFinfo | ( | unsigned int | i | ) | const |
Return the specified DestFinfo
References dummy(), and getNumDestFinfo().
Referenced by Neutral::getDestFields().
string Cinfo::getDocs | ( | ) | const |
Return the documentation string
Referenced by initCinfo().
Finfo * Cinfo::getFieldElementFinfo | ( | unsigned int | i | ) | const |
Return the specified FieldElementFinfo
References dummy(), and getNumFieldElementFinfo().
Finfo * Cinfo::getLookupFinfo | ( | unsigned int | i | ) | const |
Return the specified LookupFinfo
References dummy(), and getNumLookupFinfo().
unsigned int Cinfo::getNumDestFinfo | ( | ) | const |
Return number of DestFinfo
References getNumDestFinfo().
Referenced by Neutral::getDestFields(), getDestFinfo(), getNumDestFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumFieldElementFinfo | ( | ) | const |
Return number of FieldElementFinfos
References getNumFieldElementFinfo().
Referenced by getFieldElementFinfo(), and getNumFieldElementFinfo().
unsigned int Cinfo::getNumLookupFinfo | ( | ) | const |
Return number of LookupFinfo
References getNumLookupFinfo().
Referenced by getLookupFinfo(), getNumLookupFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumSharedFinfo | ( | ) | const |
Return number of SharedFinfos
References getNumSharedFinfo().
Referenced by getNumSharedFinfo(), getSharedFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumSrcFinfo | ( | ) | const |
Return number of SrcFinfos
References getNumSrcFinfo().
Referenced by getNumSrcFinfo(), Neutral::getSourceFields(), getSrcFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumValueFinfo | ( | ) | const |
Return number of ValueFinfo
References getNumValueFinfo().
Referenced by getNumValueFinfo(), Neutral::getValueFields(), getValueFinfo(), and testCinfoFields().
looks up OpFunc by FuncId
Referenced by GetOpFunc1< T, L, A >::op(), GetEpFunc1< T, L, A >::op(), and putFuncsInOrder().
Finfo * Cinfo::getSharedFinfo | ( | unsigned int | i | ) |
Return the specified SharedFinfo
References dummy(), and getNumSharedFinfo().
Finfo * Cinfo::getSrcFinfo | ( | unsigned int | i | ) | const |
Return the specified SrcFinfo
References getNumSrcFinfo(), and getSrcFinfo().
Referenced by Neutral::getSourceFields(), and getSrcFinfo().
Finfo * Cinfo::getValueFinfo | ( | unsigned int | i | ) | const |
Return the specified ValueFinfo
References dummy(), and getNumValueFinfo().
Referenced by Neutral::getValueFields().
void Cinfo::init | ( | Finfo ** | finfoArray, | |
unsigned int | nFinfos | |||
) |
Initializes the Cinfo. Must be called exactly once for each Cinfo.
init: initializes the Cinfo. Must be called just once
References registerFinfo().
const Cinfo * Cinfo::initCinfo | ( | ) | [static] |
Initializer for the MOOSE fields for Cinfo
References dinfo(), getBaseClass(), getDocs(), and Neutral::initCinfo().
Referenced by makeCinfoElements().
bool Cinfo::isA | ( | const string & | ancestor | ) | const |
Returns true if the current Cinfo is derived from the ancestor
Referenced by Neutral::destroy(), fillSegIndex(), getCompt(), Stoich::getProxyPools(), getReactantVols(), isPartOfDend(), ReadCspace::makePlots(), ReadCspace::printMol(), ZombiePoolInterface::setCompartment(), Stoich::setCompartment(), Gsolve::setCompartment(), Stoich::setDsolve(), Ksolve::setDsolve(), Gsolve::setDsolve(), Stoich::setKsolve(), Gsolve::setN(), Gsolve::setNinit(), HSolve::setSeed(), ZombieReac::setSolver(), ZombieMMenz::setSolver(), ZombieFunction::setSolver(), ZombieEnz::setSolver(), Neuron::setSpineAndPsdMesh(), SteadyState::setStoich(), Ksolve::setStoich(), Gsolve::setStoich(), testIsA(), ZombiePool::vSetSolver(), ZombieHHChannel::vSetSolver(), ZombieCompartment::vSetSolver(), and ZombieCaConc::vSetSolver().
void Cinfo::makeCinfoElements | ( | Id | parent | ) | [static] |
Utility function used at init to create the inspection Elements for each of the Cinfos.
References Shell::adopt(), DinfoBase::assignData(), buildFinfoElement(), Element::data(), dinfo(), dummy(), initCinfo(), and Id::nextId().
Referenced by init().
const std::string & Cinfo::name | ( | ) | const |
Return the name of the Cinfo
Referenced by getBaseClass(), Neutral::getClass(), innerCopyElements(), Ksolve::setDsolve(), Gsolve::setDsolve(), ZombieFunction::setSolver(), Element::setTick(), Stoich::unZombifyModel(), ZombiePool::vSetSolver(), and Element::zombieSwap().
unsigned int Cinfo::numBindIndex | ( | ) | const |
Finds the funcId by name. Returns 0 on failure. const FuncId findFuncId( const string& name) const; Number of SrcMsgs in total. Each has a unique number to bind to an entry in the msgBinding vector in the Element.
Referenced by Neutral::getOutgoingMsgs(), and Eref::msgDigest().
Used in derived classes, to replace the original OpFunc with the new one.
Referenced by DestFinfo::registerFinfo().
Handles any operations that must be done after an Element is created. Scans through all Finfos as they are the ones to manage such requests. Examples are to create FieldElements.
void Cinfo::rebuildOpIndex | ( | ) | [static] |
Ensures that the Func Ids are always in a fixed order, regardless of the sequence of static initialization of Cinfos.
References OpFunc::setIndex().
Referenced by init().
BindIndex Cinfo::registerBindIndex | ( | ) |
Returns the next free value for BindIndex, and keeps track of the total number set up.
Referenced by SrcFinfo::registerFinfo().
void Cinfo::registerFinfo | ( | Finfo * | f | ) |
registerFinfo: Puts Finfo information into Cinfo, and updates fields on Finfo as necessary.
References Finfo::name(), and Finfo::registerFinfo().
Referenced by init(), ReadOnlyValueFinfo< T, F >::registerFinfo(), ValueFinfo< T, F >::registerFinfo(), SharedFinfo::registerFinfo(), ReadOnlyLookupValueFinfo< T, L, F >::registerFinfo(), LookupValueFinfo< T, L, F >::registerFinfo(), ReadOnlyLookupElementValueFinfo< T, L, F >::registerFinfo(), LookupElementValueFinfo< T, L, F >::registerFinfo(), FieldElementFinfoBase::registerFinfo(), ReadOnlyElementValueFinfo< T, F >::registerFinfo(), and ElementValueFinfo< T, F >::registerFinfo().
Registers the OpFunc, assigns it a FuncId and returns the FuncId.
Referenced by DestFinfo::registerFinfo().
void Cinfo::registerPostCreationFinfo | ( | const Finfo * | f | ) |
Registers a finfo as needing post-creation work
Referenced by FieldElementFinfoBase::registerFinfo().
void Cinfo::reportFids | ( | ) | const |
Utility function for debugging
References DestFinfo::getFid(), and Finfo::name().
void Cinfo::setNumFinfo | ( | unsigned int | v | ) |
Dummy function. We never allow this assignment.
const string & Cinfo::srcFinfoName | ( | BindIndex | bid | ) | const |
Returns the name of the SrcFinfo having the specified BindIndex, on this Cinfo. Returns "" on failure.
References SrcFinfo::getBindIndex(), Finfo::name(), and srcFinfoName().
Referenced by Msg::getSrcFieldsOnE1(), Msg::getSrcFieldsOnE2(), and srcFinfoName().