COPASI API
4.16.103
|
#include <CKeyFactory.h>
Classes | |
class | CDecisionVector |
class | HashTable |
Public Member Functions | |
std::string | add (const std::string &prefix, CCopasiObject *pObject) |
bool | addFix (const std::string &key, CCopasiObject *pObject) |
CKeyFactory () | |
CCopasiObject * | get (const std::string &key) |
bool | remove (const std::string &key) |
~CKeyFactory () | |
Static Public Member Functions | |
static bool | isValidKey (const std::string &key, const std::string &prefix="") |
Protected Attributes | |
std::map< std::string, HashTable > | mKeyTable |
Static Protected Attributes | |
static CDecisionVector | isDigit |
static CDecisionVector | isPrefix |
Definition at line 35 of file CKeyFactory.h.
CKeyFactory::CKeyFactory | ( | ) |
CKeyFactory::~CKeyFactory | ( | ) |
std::string CKeyFactory::add | ( | const std::string & | prefix, |
CCopasiObject * | pObject | ||
) |
Add an object with a key generated from the given prefix to the key map. The return value is the actually generated key.
const | std::string & prefix |
CCopasiObject | * pObject |
Definition at line 167 of file CKeyFactory.cpp.
References mKeyTable.
Referenced by CCompartment::CCompartment(), CEvent::CEvent(), CFunction::CFunction(), CLColorDefinition::CLColorDefinition(), CLEllipse::CLEllipse(), CLGlobalRenderInformation::CLGlobalRenderInformation(), CLGlobalStyle::CLGlobalStyle(), CLGradientStop::CLGradientStop(), CLGroup::CLGroup(), CLImage::CLImage(), CLLinearGradient::CLLinearGradient(), CLLineEnding::CLLineEnding(), CLLocalRenderInformation::CLLocalRenderInformation(), CLLocalStyle::CLLocalStyle(), CLPolygon::CLPolygon(), CLRadialGradient::CLRadialGradient(), CLRectangle::CLRectangle(), CLRenderCurve::CLRenderCurve(), CLText::CLText(), CMetab::CMetab(), CModelEntity::CModelEntity(), CReaction::CReaction(), CExperiment::initializeParameter(), and CModel::initObjects().
bool CKeyFactory::addFix | ( | const std::string & | key, |
CCopasiObject * | pObject | ||
) |
Add an object with a fix given key. The return value indicate whether the key was actually inserted.
const | std::string & key |
CCopasiObject | * pObject |
Definition at line 187 of file CKeyFactory.cpp.
References isDigit, and mKeyTable.
Referenced by CCopasiXMLParser::ModelParameterSetElement::start().
CCopasiObject * CKeyFactory::get | ( | const std::string & | key | ) |
Retrieve the object referred by key from the key map.
const | std::string & key |
Definition at line 235 of file CKeyFactory.cpp.
References isDigit, and mKeyTable.
Referenced by CModelAdd::addCompartmentsExpressions(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValuesExpressions(), CModel::applyActiveParameterSet(), CEventAssignment::compile(), CFunctionAnalyzer::constructCallParametersActualValues(), CModelExpansion::SetOfModelElements::contains(), CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CModelParameterSet::createFromModel(), CSBMLExporter::createKineticExpression(), CSBMLExporter::createKineticLaw(), CModelExpansion::createLinearArray(), CSBMLExporter::createMassActionExpression(), CMMLOutput::createParameterMapping(), CModelExpansion::createRectangularArray(), CQEventDM::data(), CEvent::deleteAssignment(), CQPlotSubwidget::deletePlot(), CModelExpansion::duplicateReaction(), CCopasiXMLParser::ListOfModelParameterSetsElement::end(), CCopasiXMLParser::PlotItemElement::end(), CCopasiXMLParser::PlotSpecificationElement::end(), CCopasiXMLParser::ListOfReportsElement::end(), CCopasiXMLParser::COPASIElement::end(), CopasiWidget::enter(), CQModelValue::enterProtected(), CQEventWidget1::enterProtected(), CQRDFTreeView::enterProtected(), FunctionWidget1::enterProtected(), CQNotes::enterProtected(), CModelExpansion::ElementsMap::exists(), CSBMLExporter::exportEventAssignments(), CODEExporter::exportKineticFunction(), CODEExporterC::exportTitleData(), FunctionWidget1::functionParametersChanged(), CFitItem::getCrossValidations(), CReactionInterface::getDeletedParameters(), CMetabNameInterface::getDisplayName(), CModelExpansion::ElementsMap::getDuplicateKey(), CObjectLists::getEventTargets(), CFitItem::getExperiments(), CLTextGlyph::getGraphicalObject(), CObjectLists::getListOfConstObjects(), CLMetabReferenceGlyph::getMetabGlyph(), CChemEqElement::getMetabolite(), CLGraphicalObject::getModelObject(), CQModelElementTreeWidgetItem::getObject(), CQSideCompoundWizardPage::CQListWidgetModelItem::getObject(), CTimeSeries::getSBMLId(), CLNAProblem::getSubTask(), CMCAProblem::getSubTask(), CLReferenceGlyph::getTargetGlyph(), CLabel::getText(), CLGraphicalObject::hasValidModelReference(), CSBMLExporter::hasVolumeAssignment(), CReactionInterface::initFromReaction(), CSBMLExporter::isEventAssignmentSBMLCompatible(), CSBMLExporter::isEventSBMLCompatible(), CExperimentSet::keyToIndex(), CODEExporterC::KineticFunction2ODEmember(), FunctionWidget1::leave(), CQNotes::leave(), CQTabWidget::load(), CMIRIAMInfo::load(), CQEventWidget1::loadFromEvent(), CReactionInterface::loadMappingAndValues(), CQFittingItemWidget::loadSelection(), ScanWidget::loadTask(), SensitivitiesWidget::loadTask(), SteadyStateWidget::loadTask(), CModelMerging::mergeInExpression(), SBMLDocumentLoader::postprocessTextGlyph(), printNameForKey(), CModel::printParameterOverview(), CFitProblem::printResult(), CModelParameter::refreshFromModel(), CModel::removeCompartment(), CModel::removeEvent(), CFunctionDB::removeFunction(), CCopasiDataModel::removeLayout(), CModel::removeLocalReactionParameter(), CModel::removeMetabolite(), CModel::removeModelValue(), COutputDefinitionVector::removePlotSpec(), CModel::removeReaction(), CReportDefinitionVector::removeReportDefinition(), CQMCAWidget::runTask(), CQLNAWidget::runTask(), CQFittingWidget::runTask(), CQLyapWidget::runTask(), CQOptimizationWidget::runTask(), CQTabWidget::save(), CMIRIAMInfo::save(), ScanWidget::saveTask(), SensitivitiesWidget::saveTask(), SteadyStateWidget::saveTask(), CQFittingWidget::saveTask(), FunctionWidget1::saveToFunction(), ReactionsWidget1::saveToReaction(), CQNewMainWindow::selectReaction(), CQReactionDM::setEquation(), ReactionsWidget1::setFramework(), SBMLImporter::setInitialValues(), CChemEqElement::setMetabolite(), FunctionWidget1::slotBtnDelete(), ReactionsWidget1::slotBtnDelete(), CQFittingItemWidget::slotCrossValidationChanged(), CQPlotsWidget::slotDoubleClicked(), CQReportsWidget::slotDoubleClicked(), CQFittingItemWidget::slotExperimentChanged(), ReactionsWidget1::slotGotoFunction(), CQBrowserPaneDM::slotNotify(), CQExperimentData::slotOK(), CCopasiXMLParser::StateTemplateVariableElement::start(), CCopasiXMLParser::SourceParameterElement::start(), CCopasiXMLParser::CallParameterElement::start(), CCopasiXMLParser::KineticLawElement::start(), CCopasiXMLParser::ModifierElement::start(), CCopasiXMLParser::ProductElement::start(), CCopasiXMLParser::SubstrateElement::start(), CCopasiXMLParser::ReactionElement::start(), CCopasiXMLParser::MetaboliteElement::start(), CCopasiXMLParser::AssignmentElement::start(), CCopasiXMLParser::ParameterElement::start(), CCopasiXMLParser::SliderElement::start(), CCopasiXMLParser::CompartmentGlyphElement::start(), CCopasiXMLParser::MetaboliteGlyphElement::start(), CCopasiXMLParser::MetaboliteReferenceGlyphElement::start(), CCopasiXMLParser::ReactionGlyphElement::start(), CCopasiXMLParser::TextGlyphElement::start(), CCopasiXMLParser::SBMLMapElement::start(), CCopasiXMLParser::LocalStyleElement::start(), CQFittingWidget::taskFinishedEvent(), test000075::test_import_time_dependent_function_definition(), test000087::test_simulate_reaction_flux_reference_1(), CQLayoutScene::updatePosition(), ParameterTable::updateTable(), CReaction::variable2object(), CReactionInterface::writeBackToReaction(), and CMMLOutput::writeDifferentialEquations().
|
static |
check whether the key is valid
const | std::string & key |
const | std::string & prefix (default: check for [_a-zA-Z]+_+) |
CKeyFactory class. This class is used to create a unique key whithin COPASI. It also allows retreival of the CCopasiObject the key is assigned to.
Created for Copasi by Stefan Hoops 2003 Copyright Stefan Hoops
Definition at line 30 of file CKeyFactory.cpp.
References isDigit, and isPrefix.
Referenced by CCopasiParameter::isValidValue(), and CCopasiXMLParser::ParameterElement::start().
bool CKeyFactory::remove | ( | const std::string & | key | ) |
Remove the key and the related object from the key map.
const | std::string & key |
Definition at line 210 of file CKeyFactory.cpp.
References isDigit, and mKeyTable.
Referenced by COutputDefinitionVector::cleanup(), CReportDefinitionVector::cleanup(), CReportDefinition::cleanup(), CExperiment::initializeParameter(), CAnnotation::~CAnnotation(), CBiologicalDescription::~CBiologicalDescription(), CCompartment::~CCompartment(), CCopasiParameter::~CCopasiParameter(), CCopasiTask::~CCopasiTask(), CCreator::~CCreator(), CEvent::~CEvent(), CFunction::~CFunction(), CFunctionParameter::~CFunctionParameter(), CLayout::~CLayout(), CLColorDefinition::~CLColorDefinition(), CLEllipse::~CLEllipse(), CLGradientBase::~CLGradientBase(), CLGraphicalObject::~CLGraphicalObject(), CLGroup::~CLGroup(), CLImage::~CLImage(), CListOfLayouts::~CListOfLayouts(), CLPolygon::~CLPolygon(), CLRectangle::~CLRectangle(), CLRenderCurve::~CLRenderCurve(), CLRenderInformationBase::~CLRenderInformationBase(), CLStyle::~CLStyle(), CLText::~CLText(), CMetab::~CMetab(), CModel::~CModel(), CModelParameterSet::~CModelParameterSet(), CModification::~CModification(), CMoiety::~CMoiety(), CReaction::~CReaction(), CReference::~CReference(), and CSlider::~CSlider().
|
staticprotected |
Fast way to decide whether a character is a digit.
Definition at line 79 of file CKeyFactory.h.
Referenced by addFix(), get(), isValidKey(), and remove().
|
staticprotected |
Fast way to decide whether a character is a valid part of the prefix.
Definition at line 84 of file CKeyFactory.h.
Referenced by isValidKey().
|
protected |