MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <Cinfo.h>
Public Member Functions | |
bool | banCreation () const |
const Cinfo * | baseCinfo () const |
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) | |
const string & | destFinfoName (FuncId fid) const |
const DinfoBase * | dinfo () const |
const Finfo * | findFinfo (const string &name) const |
const map< string, Finfo * > & | finfoMap () const |
string | getBaseClass () const |
Finfo * | getDestFinfo (unsigned int i) const |
string | getDocs () const |
Finfo * | getFieldElementFinfo (unsigned int i) const |
Finfo * | getLookupFinfo (unsigned int i) const |
unsigned int | getNumDestFinfo () const |
unsigned int | getNumFieldElementFinfo () const |
unsigned int | getNumLookupFinfo () const |
unsigned int | getNumSharedFinfo () const |
unsigned int | getNumSrcFinfo () const |
unsigned int | getNumValueFinfo () const |
const OpFunc * | getOpFunc (FuncId fid) const |
Finfo * | getSharedFinfo (unsigned int i) |
Finfo * | getSrcFinfo (unsigned int i) const |
Finfo * | getValueFinfo (unsigned int i) const |
void | init (Finfo **finfoArray, unsigned int nFinfos) |
bool | isA (const string &ancestor) const |
const std::string & | name () const |
unsigned int | numBindIndex () const |
void | overrideFunc (FuncId fid, const OpFunc *f) |
void | postCreationFunc (Id newId, Element *newElm) const |
BindIndex | registerBindIndex () |
void | registerFinfo (Finfo *f) |
FuncId | registerOpFunc (const OpFunc *f) |
void | registerPostCreationFinfo (const Finfo *f) |
void | reportFids () const |
void | setNumFinfo (unsigned int v) |
const string & | srcFinfoName (BindIndex bid) const |
~Cinfo () | |
Static Public Member Functions | |
static const Cinfo * | find (const std::string &name) |
static const Cinfo * | initCinfo () |
static void | makeCinfoElements (Id parent) |
static void | rebuildOpIndex () |
Static Private Member Functions | |
static map< string, Cinfo * > & | cinfoMap () |
Private Attributes | |
bool | banCreation_ |
const Cinfo * | baseCinfo_ |
vector< Finfo * > | destFinfos_ |
Keep track of all DestFinfos. More... | |
const DinfoBase * | dinfo_ |
std::map< std::string, std::string > | doc_ |
vector< Finfo * > | fieldElementFinfos_ |
Keep track of all FieldElementFinfos. More... | |
map< string, Finfo * > | finfoMap_ |
vector< const OpFunc * > | funcs_ |
vector< Finfo * > | lookupFinfos_ |
Keep track of all LookupFinfos. More... | |
string | name_ |
BindIndex | numBindIndex_ |
vector< const Finfo * > | postCreationFinfos_ |
vector< Finfo * > | sharedFinfos_ |
Keep track of all SharedFinfos. More... | |
vector< Finfo * > | srcFinfos_ |
Keep track of all SrcFinfos. More... | |
vector< Finfo * > | valueFinfos_ |
Keep track of all ValueFinfos. More... | |
Static Private Attributes | |
static unsigned int | numCoreOpFunc_ = 0 |
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 | ( | ) |
Cinfo::Cinfo | ( | const Cinfo & | other | ) |
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.
Definition at line 232 of file Cinfo.cpp.
References banCreation_.
Referenced by Shell::doCreate().
const Cinfo * Cinfo::baseCinfo | ( | ) | const |
Definition at line 216 of file Cinfo.cpp.
References baseCinfo_.
Referenced by defineClass(), and DestFinfo::registerFinfo().
|
staticprivate |
Definition at line 307 of file Cinfo.cpp.
Referenced by find(), makeCinfoElements(), and rebuildOpIndex().
const string & Cinfo::destFinfoName | ( | FuncId | fid | ) | const |
Returns the name of the DestFinfo having the specified FuncId, on this Cinfo. Returns "" on failure.
Definition at line 569 of file Cinfo.cpp.
References baseCinfo_, destFinfoName(), destFinfos_, DestFinfo::getFid(), and Finfo::name().
Referenced by destFinfoName(), Msg::getDestFieldsOnE1(), Msg::getDestFieldsOnE2(), and Element::getMsgTargetAndFunctions().
const DinfoBase * Cinfo::dinfo | ( | ) | const |
Returns the Dinfo, which manages creation and destruction of the data, and knows about its size.
Definition at line 275 of file Cinfo.cpp.
References dinfo_.
Referenced by buildFinfoElement(), DataElement::DataElement(), initCinfo(), makeCinfoElements(), DataElement::resize(), DataElement::zombieSwap(), and DataElement::~DataElement().
|
static |
Finds the Cinfo with the specified name.
Definition at line 200 of file Cinfo.cpp.
References cinfoMap().
Referenced by Stoich::allocateModelObject(), defineAllClasses(), Shell::doCreate(), Dsolve::fillConcChans(), findAllConnectedCompartments(), Cell::findCompt(), getComptParent(), getFieldDict(), getFieldNames(), getFieldType(), Shell::innerCreate(), Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), ZombieEnz::setSolver(), testSyncSynapseSize(), Stoich::unZombifyModel(), Stoich::unZombifyPools(), Pool::vSetIsBuffered(), Stoich::zombifyModel(), and Stoich::zombifyPoolFuncWithScaling().
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.
Looks up Finfo from name.
Definition at line 224 of file Cinfo.cpp.
References finfoMap_.
Referenced by addClockMsg(), Shell::adopt(), Stoich::allocateModelObject(), ReadCell::buildCompartment(), SetGet::checkSet(), Neutral::child(), Neutral::children(), convertConcToNumRateUsingMesh(), HSolve::deleteIncomingMessages(), Shell::doAddMsg(), enzDest(), Dsolve::fillConcChans(), findAllConnectedCompartments(), findFuncMsgSrc(), findMeshOfEnz(), findParentComptOfReac(), getComptParent(), getFieldType(), Neutral::getMsgDestFunctions(), Neutral::getMsgDests(), Neutral::getNeighbors(), getSlaveEnable(), Shell::innerAddMsg(), innerCopyMsgs(), Shell::innerMove(), Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), Neutral::isDescendant(), isOffSolverReac(), localGet(), Neutral::parent(), Neutral::path(), FieldElementFinfoBase::postCreationFunc(), HSolveActive::readSynapses(), DestFinfo::registerFinfo(), ZombieMMenz::setSolver(), ZombieEnz::setSolver(), Element::setTick(), SetGet::strGet(), SetGet::strSet(), HSolveUtils::targets(), testAssortedMsg(), testCreateMsg(), testFibonacci(), testFinfoFields(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSendSpike(), testSharedMsg(), testShellAddMsg(), testSparseMsg(), testSyncSynapseSize(), and FieldElement::zombieSwap().
const map< string, Finfo * > & Cinfo::finfoMap | ( | ) | const |
Returns the map between name and field info
Definition at line 270 of file Cinfo.cpp.
References finfoMap_.
Referenced by Shell::doAddMsg(), Element::showFields(), and Element::showMsg().
string Cinfo::getBaseClass | ( | ) | const |
Return the name of the base class
Definition at line 391 of file Cinfo.cpp.
References baseCinfo_, and name().
Referenced by defineClass(), and initCinfo().
Finfo * Cinfo::getDestFinfo | ( | unsigned int | i | ) | const |
Return the specified DestFinfo
Definition at line 430 of file Cinfo.cpp.
References baseCinfo_, destFinfos_, dummy, and getNumDestFinfo().
Referenced by Neutral::getDestFields(), getFieldDict(), and getFieldNames().
string Cinfo::getDocs | ( | ) | const |
Return the documentation string
Definition at line 376 of file Cinfo.cpp.
References doc_.
Referenced by initCinfo().
Finfo * Cinfo::getFieldElementFinfo | ( | unsigned int | i | ) | const |
Return the specified FieldElementFinfo
Definition at line 523 of file Cinfo.cpp.
References baseCinfo_, dummy, fieldElementFinfos_, and getNumFieldElementFinfo().
Referenced by getFieldDict(), and getFieldNames().
Finfo * Cinfo::getLookupFinfo | ( | unsigned int | i | ) | const |
Return the specified LookupFinfo
Definition at line 477 of file Cinfo.cpp.
References baseCinfo_, dummy, getNumLookupFinfo(), and lookupFinfos_.
Referenced by getFieldDict(), and getFieldNames().
unsigned int Cinfo::getNumDestFinfo | ( | ) | const |
Return number of DestFinfo
Definition at line 444 of file Cinfo.cpp.
References baseCinfo_, destFinfos_, and getNumDestFinfo().
Referenced by defineDestFinfos(), Neutral::getDestFields(), getDestFinfo(), getFieldDict(), getFieldNames(), getNumDestFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumFieldElementFinfo | ( | ) | const |
Return number of FieldElementFinfos
Definition at line 537 of file Cinfo.cpp.
References baseCinfo_, fieldElementFinfos_, and getNumFieldElementFinfo().
Referenced by defineElementFinfos(), getFieldDict(), getFieldElementFinfo(), getFieldNames(), and getNumFieldElementFinfo().
unsigned int Cinfo::getNumLookupFinfo | ( | ) | const |
Return number of LookupFinfo
Definition at line 491 of file Cinfo.cpp.
References baseCinfo_, getNumLookupFinfo(), and lookupFinfos_.
Referenced by defineLookupFinfos(), getFieldDict(), getFieldNames(), getLookupFinfo(), getNumLookupFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumSharedFinfo | ( | ) | const |
Return number of SharedFinfos
Definition at line 514 of file Cinfo.cpp.
References baseCinfo_, getNumSharedFinfo(), and sharedFinfos_.
Referenced by getNumSharedFinfo(), getSharedFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumSrcFinfo | ( | ) | const |
Return number of SrcFinfos
Definition at line 421 of file Cinfo.cpp.
References baseCinfo_, getNumSrcFinfo(), and srcFinfos_.
Referenced by getFieldDict(), getFieldNames(), getNumSrcFinfo(), Neutral::getSourceFields(), getSrcFinfo(), and testCinfoFields().
unsigned int Cinfo::getNumValueFinfo | ( | ) | const |
Return number of ValueFinfo
Definition at line 467 of file Cinfo.cpp.
References baseCinfo_, getNumValueFinfo(), and valueFinfos_.
Referenced by getFieldDict(), getFieldNames(), getNumValueFinfo(), Neutral::getValueFields(), getValueFinfo(), and testCinfoFields().
looks up OpFunc by FuncId
Definition at line 240 of file Cinfo.cpp.
References funcs_.
Referenced by GetOpFunc1< T, L, A >::op(), GetEpFunc1< T, L, A >::op(), putFuncsInOrder(), and Element::putOffNodeTargetsInDigest().
Finfo * Cinfo::getSharedFinfo | ( | unsigned int | i | ) |
Return the specified SharedFinfo
Definition at line 500 of file Cinfo.cpp.
References baseCinfo_, dummy, getNumSharedFinfo(), and sharedFinfos_.
Finfo * Cinfo::getSrcFinfo | ( | unsigned int | i | ) | const |
Return the specified SrcFinfo
Definition at line 406 of file Cinfo.cpp.
References baseCinfo_, getNumSrcFinfo(), getSrcFinfo(), and srcFinfos_.
Referenced by PostMaster::clearPendingRecv(), getFieldDict(), getFieldNames(), Neutral::getSourceFields(), and getSrcFinfo().
Finfo * Cinfo::getValueFinfo | ( | unsigned int | i | ) | const |
Return the specified ValueFinfo
Definition at line 453 of file Cinfo.cpp.
References baseCinfo_, dummy, getNumValueFinfo(), and valueFinfos_.
Referenced by getFieldDict(), getFieldNames(), and 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
Definition at line 82 of file Cinfo.cpp.
References baseCinfo_, finfoMap_, funcs_, numBindIndex_, postCreationFinfos_, and registerFinfo().
|
static |
Initializer for the MOOSE fields for Cinfo
Definition at line 327 of file Cinfo.cpp.
References cinfoCinfo, 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
Definition at line 280 of file Cinfo.cpp.
References baseCinfo_, Neutral::initCinfo(), and name_.
Referenced by assignParam(), Dsolve::buildMeshJunctions(), Dsolve::buildNeuroMeshJunctions(), Dsolve::calcJunction(), HSolve::deepSearchForCompartment(), Neutral::destroy(), doClassSpecificMessaging(), Shell::doLoadModel(), fillSegIndex(), fillSegments(), VoxelPoolsBase::filterCrossRateTerms(), findAllConnectedCompartments(), getCompt(), Stoich::getProxyPools(), getReactantVols(), Neutral::isA(), isOffSolverReac(), isPartOfDend(), ReadKkit::loadTab(), Stoich::locateOffSolverReacs(), ReadCspace::makePlots(), ReadCspace::printMol(), ReadCell::read(), Gsolve::setCompartment(), Dsolve::setCompartment(), ZombiePoolInterface::setCompartment(), Stoich::setCompartment(), Ksolve::setDsolve(), Gsolve::setDsolve(), Stoich::setDsolve(), Stoich::setKsolve(), Gsolve::setN(), Gsolve::setNinit(), HSolve::setSeed(), ZombieFunction::setSolver(), ZombieReac::setSolver(), ZombieMMenz::setSolver(), ZombieEnz::setSolver(), Neuron::setSpineAndPsdMesh(), Gsolve::setStoich(), SteadyState::setStoich(), Ksolve::setStoich(), Dsolve::setStoich(), EndoMesh::setSurround(), ReadKkit::setupSlaveMsg(), testIsA(), ZombiePool::vSetSolver(), ZombieCaConc::vSetSolver(), ZombieHHChannel::vSetSolver(), and ZombieCompartment::vSetSolver().
|
static |
Utility function used at init to create the inspection Elements for each of the Cinfos.
Definition at line 164 of file Cinfo.cpp.
References Shell::adopt(), DinfoBase::assignData(), buildFinfoElement(), cinfoMap(), Element::data(), dinfo(), dummy, initCinfo(), and Id::nextId().
Referenced by init().
const std::string & Cinfo::name | ( | ) | const |
Return the name of the Cinfo
Definition at line 260 of file Cinfo.cpp.
References name_.
Referenced by ReadCell::addCaConc(), ReadCell::addCanonicalChannel(), ReadCell::addSpikeGen(), defineClass(), defineDestFinfos(), defineElementFinfos(), defineLookupFinfos(), HSolve::deleteIncomingMessages(), getBaseClass(), Neutral::getClass(), innerCopyElements(), Shell::innerCreate(), Dsolve::setCompartment(), Ksolve::setDsolve(), Gsolve::setDsolve(), Dsolve::setPath(), ZombieFunction::setSolver(), EndoMesh::setSurround(), Element::setTick(), Stoich::unZombifyModel(), Pool::vGetIsBuffered(), 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.
Definition at line 265 of file Cinfo.cpp.
References numBindIndex_.
Referenced by Neutral::getOutgoingMsgs(), and Eref::msgDigest().
Used in derived classes, to replace the original OpFunc with the new one.
Definition at line 103 of file Cinfo.cpp.
References funcs_.
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.
Definition at line 143 of file Cinfo.cpp.
References postCreationFinfos_.
|
static |
Ensures that the Func Ids are always in a fixed order, regardless of the sequence of static initialization of Cinfos.
Definition at line 589 of file Cinfo.cpp.
References cinfoMap(), numCoreOpFunc_, OpFunc::rebuildOpIndex(), and OpFunc::setIndex().
Referenced by init().
BindIndex Cinfo::registerBindIndex | ( | ) |
Returns the next free value for BindIndex, and keeps track of the total number set up.
Definition at line 109 of file Cinfo.cpp.
References numBindIndex_.
Referenced by SrcFinfo::registerFinfo().
void Cinfo::registerFinfo | ( | Finfo * | f | ) |
registerFinfo: Puts Finfo information into Cinfo, and updates fields on Finfo as necessary.
Definition at line 114 of file Cinfo.cpp.
References destFinfos_, fieldElementFinfos_, finfoMap_, lookupFinfos_, Finfo::name(), Finfo::registerFinfo(), sharedFinfos_, srcFinfos_, and valueFinfos_.
Referenced by init(), SharedFinfo::registerFinfo(), ElementValueFinfo< T, F >::registerFinfo(), LookupElementValueFinfo< T, L, F >::registerFinfo(), FieldElementFinfoBase::registerFinfo(), LookupValueFinfo< T, L, F >::registerFinfo(), ValueFinfo< T, F >::registerFinfo(), ReadOnlyElementValueFinfo< T, F >::registerFinfo(), ReadOnlyLookupElementValueFinfo< T, L, F >::registerFinfo(), ReadOnlyValueFinfo< T, F >::registerFinfo(), and ReadOnlyLookupValueFinfo< T, L, F >::registerFinfo().
Registers the OpFunc, assigns it a FuncId and returns the FuncId.
Definition at line 96 of file Cinfo.cpp.
References funcs_.
Referenced by DestFinfo::registerFinfo().
void Cinfo::registerPostCreationFinfo | ( | const Finfo * | f | ) |
Registers a finfo as needing post-creation work
Definition at line 138 of file Cinfo.cpp.
References postCreationFinfos_.
Referenced by FieldElementFinfoBase::registerFinfo().
void Cinfo::reportFids | ( | ) | const |
Utility function for debugging
Definition at line 292 of file Cinfo.cpp.
References finfoMap_, DestFinfo::getFid(), and Finfo::name().
void Cinfo::setNumFinfo | ( | unsigned int | v | ) |
const string & Cinfo::srcFinfoName | ( | BindIndex | bid | ) | const |
Returns the name of the SrcFinfo having the specified BindIndex, on this Cinfo. Returns "" on failure.
Definition at line 552 of file Cinfo.cpp.
References baseCinfo_, SrcFinfo::getBindIndex(), Finfo::name(), srcFinfoName(), and srcFinfos_.
Referenced by Element::getMsgSourceAndSender(), Msg::getSrcFieldsOnE1(), Msg::getSrcFieldsOnE2(), and srcFinfoName().
|
private |
Definition at line 288 of file Cinfo.h.
Referenced by banCreation().
|
private |
Definition at line 282 of file Cinfo.h.
Referenced by baseCinfo(), destFinfoName(), getBaseClass(), getDestFinfo(), getFieldElementFinfo(), getLookupFinfo(), getNumDestFinfo(), getNumFieldElementFinfo(), getNumLookupFinfo(), getNumSharedFinfo(), getNumSrcFinfo(), getNumValueFinfo(), getSharedFinfo(), getSrcFinfo(), getValueFinfo(), init(), isA(), and srcFinfoName().
|
private |
Keep track of all DestFinfos.
Definition at line 299 of file Cinfo.h.
Referenced by destFinfoName(), getDestFinfo(), getNumDestFinfo(), and registerFinfo().
|
private |
|
private |
|
private |
Keep track of all FieldElementFinfos.
Definition at line 311 of file Cinfo.h.
Referenced by getFieldElementFinfo(), getNumFieldElementFinfo(), and registerFinfo().
|
private |
This looks up Finfos by name.
Definition at line 293 of file Cinfo.h.
Referenced by findFinfo(), finfoMap(), init(), registerFinfo(), and reportFids().
|
private |
Definition at line 319 of file Cinfo.h.
Referenced by getOpFunc(), init(), overrideFunc(), and registerOpFunc().
|
private |
Keep track of all LookupFinfos.
Definition at line 305 of file Cinfo.h.
Referenced by getLookupFinfo(), getNumLookupFinfo(), and registerFinfo().
|
private |
|
private |
Definition at line 285 of file Cinfo.h.
Referenced by init(), numBindIndex(), and registerBindIndex().
|
staticprivate |
Definition at line 323 of file Cinfo.h.
Referenced by rebuildOpIndex().
|
private |
These are special Finfos which have to be invoked after the Element is created, and their postCreationFuncs called. They are typically things like FieldElementFinfos.
Definition at line 318 of file Cinfo.h.
Referenced by init(), postCreationFunc(), and registerPostCreationFinfo().
|
private |
Keep track of all SharedFinfos.
Definition at line 308 of file Cinfo.h.
Referenced by getNumSharedFinfo(), getSharedFinfo(), and registerFinfo().
|
private |
Keep track of all SrcFinfos.
Definition at line 296 of file Cinfo.h.
Referenced by getNumSrcFinfo(), getSrcFinfo(), registerFinfo(), and srcFinfoName().
|
private |
Keep track of all ValueFinfos.
Definition at line 302 of file Cinfo.h.
Referenced by getNumValueFinfo(), getValueFinfo(), and registerFinfo().