COPASI API  4.16.103
Public Types | Public Member Functions | Friends | List of all members
CCopasiVector< T > Class Template Reference

#include <compare_utilities.h>

Inheritance diagram for CCopasiVector< T >:
Inheritance graph
[legend]
Collaboration diagram for CCopasiVector< T >:
Collaboration graph
[legend]

Public Types

typedef std::vector< CType * >
::const_iterator 
const_iterator
 
typedef std::vector< CType * >
::iterator 
iterator
 
typedef std::vector< CType * >
::value_type 
value_type
 
- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 

Public Member Functions

virtual bool add (const CType &src)
 
virtual bool add (CType *src, bool adopt=false)
 
iterator begin ()
 
const_iterator begin () const
 
 CCopasiVector (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const unsigned C_INT32 &flag=CCopasiObject::Vector)
 
 CCopasiVector (const CCopasiVector< CType > &src, const CCopasiContainer *pParent=NULL)
 
virtual void cleanup ()
 
virtual void clear ()
 
void deepCopy (const CCopasiVector< CType > &source)
 
iterator end ()
 
const_iterator end () const
 
virtual size_t getIndex (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &name) const
 
CCopasiVector< CType > & operator= (const CCopasiVector< CType > &rhs)
 
CCopasiVector< CType > & operator= (const std::vector< CType * > &rhs)
 
const value_typeoperator[] (const size_t &index) const
 
value_typeoperator[] (const size_t &index)
 
virtual void remove (const size_t &index)
 
virtual bool remove (CCopasiObject *pObject)
 
virtual void resize (const size_t &newSize)
 
virtual size_t size () const
 
virtual void swap (const size_t &indexFrom, const size_t &indexTo)
 
virtual ~CCopasiVector ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
virtual const std::string & getKey () const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
virtual void print (std::ostream *ostream) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Friends

std::ostream & operator<< (std::ostream &os, const CCopasiVector< CType > &d)
 

Additional Inherited Members

- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

template<typename T>
class CCopasiVector< T >

CCopasiXMLInterface class. The class CCopasiXMLInterface is the interface to various XML document containing COPASI relevant information.

Created for COPASI by Stefan Hoops 2003

Definition at line 34 of file compare_utilities.h.

Member Typedef Documentation

template<typename T>
typedef std::vector< CType * >::const_iterator CCopasiVector< T >::const_iterator

Definition at line 57 of file CCopasiVector.h.

template<typename T>
typedef std::vector< CType * >::iterator CCopasiVector< T >::iterator

Definition at line 56 of file CCopasiVector.h.

template<typename T>
typedef std::vector< CType * >::value_type CCopasiVector< T >::value_type

Definition at line 55 of file CCopasiVector.h.

Constructor & Destructor Documentation

template<typename T>
CCopasiVector< T >::CCopasiVector ( const std::string &  name = "NoName",
const CCopasiContainer pParent = NULL,
const unsigned C_INT32 flag = CCopasiObject::Vector 
)
inline

Default constructor

Parameters
constconst std::string & name (Default: "NoName")
constCCopasiContainer * pParent (Default: NULL)
constsize_t & flag (Default: flag | CCopasiObject::Vector)

Definition at line 68 of file CCopasiVector.h.

71  :
72  std::vector< CType * >(),
73  CCopasiContainer(name, pParent, "Vector", flag | CCopasiObject::Vector)
long int flag
Definition: f2c.h:52
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202
template<typename T>
CCopasiVector< T >::CCopasiVector ( const CCopasiVector< CType > &  src,
const CCopasiContainer pParent = NULL 
)
inline

Copy constructor

Parameters
constCCopasiVector < CType > & src
constCCopasiContainer * pParent (Default: NULL)

Definition at line 81 of file CCopasiVector.h.

82  :
83  std::vector< CType * >(src),
84  CCopasiContainer(src, pParent)
85  {
87 
88  size_t i, imax = size();
89  iterator Target = begin();
90  const_iterator Source = src.begin();
91 
92  for (i = 0; i < imax; i++, Target++, Source++)
93  {
94  try
95  {
96  *Target = new CType(**Source, this);
97  }
98  catch (...)
99  {
100  *Target = NULL;
101  }
102 
103  if (*Target == NULL)
104  CCopasiMessage ex(CCopasiMessage::EXCEPTION, MCopasiBase + 1, imax * sizeof(CType));
105  }
106  }
virtual size_t size() const
iterator begin()
#define MCopasiBase
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202
template<typename T>
virtual CCopasiVector< T >::~CCopasiVector ( )
inlinevirtual

Destructor

Definition at line 111 of file CCopasiVector.h.

112  {
113  cleanup();
115  }
#define DESTRUCTOR_TRACE
Definition: copasi.h:206
virtual void cleanup()

Member Function Documentation

template<typename T>
virtual bool CCopasiVector< T >::add ( const CType &  src)
inlinevirtual

Add a copy of the object to the end of the vector.

Parameters
constCType & src
Returns
bool success.

Reimplemented in CCopasiVectorN< CType >.

Definition at line 223 of file CCopasiVector.h.

Referenced by CLGroup::addChildElement(), CLRenderInformationBase::addColorDefinition(), CLayout::addCompartmentGlyph(), CCopasiRootContainer::addDatamodel(), CChemEq::addElement(), CLayout::addGeneralGlyph(), CListOfLayouts::addGlobalRenderInformation(), CLRenderInformationBase::addGradientDefinition(), CLGradientBase::addGradientStop(), CLRenderInformationBase::addLineEnding(), CLayout::addLocalRenderInformation(), CLayout::addMetaboliteGlyph(), CLReactionGlyph::addMetabReferenceGlyph(), CLayout::addReactionGlyph(), CLGeneralGlyph::addReferenceGlyph(), SliderDialog::addSlider(), CLLocalRenderInformation::addStyle(), CLGlobalRenderInformation::addStyle(), CLGeneralGlyph::addSubglyph(), CLayout::addTextGlyph(), CModel::buildMoieties(), CLayout::CLayout(), CLGlobalRenderInformation::CLGlobalRenderInformation(), CLGroup::CLGroup(), CLLocalRenderInformation::CLLocalRenderInformation(), CLRenderInformationBase::CLRenderInformationBase(), CMathModel::compile(), CMIRIAMInfo::createBiologicalDescription(), CLRenderInformationBase::createColorDefinition(), CMIRIAMInfo::createCreator(), CLGroup::createCurve(), CMathContainer::createDiscontinuityDataEvent(), CLGroup::createEllipse(), CLGradientBase::createGradientStop(), CLGroup::createGroup(), CLGroup::createImage(), CPlotSpecification::createItem(), CLRenderInformationBase::createLinearGradientDefinition(), CLRenderInformationBase::createLineEnding(), CModel::createMetabolite(), CMIRIAMInfo::createModification(), CLGroup::createPolygon(), CLRenderInformationBase::createRadialGradientDefinition(), CLGroup::createRectangle(), CMIRIAMInfo::createReference(), CLLocalRenderInformation::createStyle(), CLGlobalRenderInformation::createStyle(), CLGroup::createText(), CCopasiXMLParser::ListOfLayoutsElement::end(), CModel::initializeMetabolites(), CMIRIAMInfo::loadBiologicalDescriptions(), CMIRIAMInfo::loadCreators(), loadDefaultStyles(), CQEventWidget1::loadFromEvent(), CMIRIAMInfo::loadModifications(), CMIRIAMInfo::loadReferences(), CCopasiVector< CLGeneralGlyph >::operator=(), CQPlotSubwidget::saveToPlotSpec(), CQEventWidget1::slotAddTarget(), CCopasiXMLParser::MetaboliteElement::start(), CCopasiXMLParser::SliderElement::start(), and CExperiment::updateFittedPoints().

224  {
225  CType * Element;
226 
227  try
228  {
229  Element = new CType(src);
230  }
231  catch (...)
232  {
233  Element = NULL;
234  }
235 
236  if (Element == NULL)
237  CCopasiMessage ex(CCopasiMessage::EXCEPTION, MCopasiBase + 1, sizeof(CType));
238 
239  // This is not very efficient !!!
240  // It results in a lot of resizing of the vector !!!
241  std::vector< CType * >::push_back(Element);
242  return CCopasiContainer::add(Element);
243  }
#define MCopasiBase
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
template<typename T>
virtual bool CCopasiVector< T >::add ( CType *  src,
bool  adopt = false 
)
inlinevirtual

Add an object to the end of the vector, if adobt is true the vector. becomes the parent of the object.

Parameters
CType* src
constbool & adopt (Default: false)
Returns
bool success

Definition at line 275 of file CCopasiVector.h.

276  {
277  // This is not very efficient !!!
278  // It results in a lot of resizing of the vector !!!
279  std::vector< CType * >::push_back(src);
280  return CCopasiContainer::add(src, adopt);
281  }
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
template<typename T>
iterator CCopasiVector< T >::begin ( )
inline

Definition at line 185 of file CCopasiVector.h.

Referenced by CQLayoutScene::addGlyph(), CMathContainer::allocate(), CModel::appendDependentCompartments(), CModel::appendDependentEvents(), CFunctionDB::appendDependentFunctions(), CModel::appendDependentMetabolites(), CModel::appendDependentModelValues(), CModel::appendDependentReactions(), CCopasiDataModel::appendDependentTasks(), CMathModel::applyInitialValues(), SBMLImporter::applyStoichiometricExpressions(), CLayoutState::applyTo(), CSBMLExporter::assignSBMLIdsToReactions(), DataModelGUI::buildChangedObjects(), CModel::buildDependencyGraphs(), CMathModel::buildDependendRefreshList(), CModel::buildInitialRefreshSequence(), CModel::buildInitialSequence(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CSSAMethod::buildKineticMatrix(), CModel::buildMoieties(), CModel::buildNonSimulatedSequence(), CModel::buildRedStoi(), CModel::buildSimulatedSequence(), CModel::buildStateTemplate(), CModel::buildStoi(), CModel::buildUserOrder(), CLNAMethod::calculateCovarianceMatrixReduced(), CModel::calculateElasticityMatrix(), CMCAMethod::calculateUnscaledElasticities(), CCopasiVector< CLGeneralGlyph >::CCopasiVector(), CSBMLExporter::check_for_spatial_size_units(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForODESpeciesInNonfixedCompartment(), CFixLocalReactionParameters::checkModel(), CLayout::CLayout(), CLayoutState::CLayoutState(), CCopasiVector< CLGeneralGlyph >::cleanup(), CCopasiVector< CLGeneralGlyph >::clear(), CCopasiDataModel::commonAfterLoad(), CMathModel::compile(), CEvent::compile(), CMathEventN::compile(), CMetab::compile(), CReaction::compile(), CMathEvent::compile(), CModel::compile(), CMathContainer::compileEvents(), CModel::compileEvents(), CMathObject::compilePropensity(), contains_necessary_mass_action_elements(), containsKey(), CModel::convert2NonReversible(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQConnectionGraphicsItem::CQConnectionGraphicsItem(), CSBMLExporter::createCompartments(), SBMLImporter::createCReactionFromReaction(), COutputAssistant::createDefaultOutput(), CSBMLExporter::createEvents(), CMathObject::createExtensiveReactionRateExpression(), CModelParameterSet::createFromModel(), CCopasiSpringLayout::createLayout(), CSBMLExporter::createMetabolites(), CSBMLExporter::createParameters(), CSBMLExporter::createReactions(), CQEventDM::data(), CCopasiVector< CLGeneralGlyph >::deepCopy(), CQLayoutsWidget::enterProtected(), CSBMLExporter::exportEventAssignments(), CCopasiDataModel::exportMathModel(), CCopasiDataModel::exportMathModelToString(), CQLayoutScene::fillFromLayout(), CSBMLExporter::findAvogadro(), CModel::findMetabByName(), findObjectByDisplayName(), CChemEq::getCompartments(), CObjectLists::getEventTargets(), getFunctionForKey(), CCopasiVector< CLGeneralGlyph >::getIndex(), CCopasiVectorN< CReportDefinition >::getIndex(), CObjectLists::getListOfConstObjects(), getMetabGlyphForKey(), CEFMTask::getNetReactionData(), CCopasiVector< CLGeneralGlyph >::getObject(), CCopasiVectorN< CReportDefinition >::getObject(), getQuantityParameterOrValue(), CEFMTask::getSpeciesChanges(), getTextForItem(), CModel::getTreesWithDiscontinuities(), CFunctionDB::getUsedFunctions(), CModel::handleUnusedMetabolites(), CSBMLExporter::hasVolumeAssignment(), CMathContainer::init(), CopasiPlot::initFromSpec(), CMathReaction::initialize(), QConservedSpeciesAnimation::initialize(), QFluxModeAnimation::initialize(), QTimeCourseAnimation::initialize(), CMathContainer::initializeMathObjects(), CModel::initializeMetabolites(), CSteadyStateMethod::isEquilibrium(), CSBMLExporter::isEventSBMLCompatible(), CSBMLExporter::isModelSBMLCompatible(), CTSSAMethod::isValidProblem(), CMCAMethod::isValidProblem(), CLNAMethod::isValidProblem(), CFunctionDB::listDependentTrees(), CQMoietiesTaskResult::load(), CQBrowserPaneDM::load(), CCopasiVectorS< CMetabOld >::load(), CCopasiVectorNS< CMetab >::load(), StateSubwidget::loadCompartments(), CQEventWidget1::loadFromEvent(), CQPlotSubwidget::loadFromPlotSpec(), StateSubwidget::loadMetabolites(), StateSubwidget::loadModelValues(), StateSubwidget::loadReactions(), moveObject(), CEvent::mustBeDeleted(), CCopasiVector< CLGeneralGlyph >::operator=(), CCopasiVector< CLGeneralGlyph >::operator[](), CCopasiVectorN< CReportDefinition >::operator[](), CMoietiesProblem::printResult(), CEFMProblem::printResult(), CCopasiVector< CLGeneralGlyph >::remove(), CFunctionDB::removeFunction(), CQParameterSetsDM::removeRows(), CQFunctionDM::removeRows(), CQReactionDM::removeRows(), CQEventDM::removeRows(), CQLayoutsDM::removeRows(), CQGlobalQuantityDM::removeRows(), CQCompartmentDM::removeRows(), CQSpecieDM::removeRows(), SBMLImporter::removeUnusedFunctions(), CCopasiVector< CLGeneralGlyph >::resize(), CCopasiXML::saveModel(), CQEventWidget1::saveToEvent(), CMCAMethod::scaleMCA(), CQNewMainWindow::selectMetabolite(), CQNewMainWindow::selectReaction(), SBMLImporter::setInitialValues(), CChemEq::setMultiplicity(), CQEFMSpeciesDM::setTask(), CQParameterOverviewWidget::slotBtnNew(), CQParameterOverviewWidget::slotBtnSaveAs(), CTauLeapMethod::start(), CStochDirectMethod::start(), CTrajAdaptiveSA::start(), CTrajectoryMethodDsaLsodar::start(), CCopasiVector< CLGeneralGlyph >::swap(), CLayoutState::tagLayout(), CExperiment::updateFittedPointValues(), CExperiment::updateFittedPointValuesFromExtendedTimeSeries(), updateLayoutList(), CModel::updateMatrixAnnotations(), CModel::updateMoietyValues(), updateRenderInformationList(), and CModel::updateSimulatedValues().

186  {return std::vector< CType * >::begin();}
template<typename T>
const_iterator CCopasiVector< T >::begin ( ) const
inline

Definition at line 188 of file CCopasiVector.h.

189  {return std::vector< CType * >::begin();}
template<typename T>
virtual void CCopasiVector< T >::cleanup ( )
inlinevirtual
template<typename T>
virtual void CCopasiVector< T >::clear ( )
inlinevirtual

Definition at line 431 of file CCopasiVector.h.

Referenced by CCopasiVector< CLGeneralGlyph >::cleanup(), CModel::clearMoieties(), CMathModel::compile(), CMathContainer::init(), CModel::initializeMetabolites(), CQEventWidget1::loadFromEvent(), CLGeneralGlyph::operator=(), CCopasiXMLParser::ListOfModelParameterSetsElement::start(), CCopasiXMLParser::ListOfReactionsElement::start(), CCopasiXMLParser::ListOfCompartmentsElement::start(), and CExperiment::updateFittedPoints().

432  {
433  size_t OldSize = size();
434 
435  if (OldSize == 0) return; // Nothing to do.
436 
437  iterator Target = begin();
438  iterator End = end();
439 
440  for (; Target != End; Target++)
441  if (*Target)
442  {
443  if ((*Target)->getObjectParent() == this)
444  {
445  CCopasiContainer::remove(*Target);
446  (*Target)->setObjectParent(NULL);
447  delete *Target;
448  }
449  else
450  CCopasiContainer::remove(*Target);
451  }
452 
453  std::vector< CType * >::resize(0);
454  }
virtual size_t size() const
iterator begin()
iterator end()
virtual bool remove(CCopasiObject *pObject)
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
template<typename T>
void CCopasiVector< T >::deepCopy ( const CCopasiVector< CType > &  source)
inline

This creates a deep copy of the source, i.e., all objects are copied and the parent of these copies is the current vector.

Parameters
constCCopasiVector< CType > & source

Definition at line 160 of file CCopasiVector.h.

Referenced by CFunctionParameters::operator=().

161  {
162  cleanup();
163  resize(source.size());
164 
165  size_t i, imax = size();
166  iterator Target = begin();
167  const_iterator Source = source.begin();
168 
169  for (i = 0; i < imax; i++, Target++, Source++)
170  {
171  try
172  {
173  *Target = new CType(**Source, this);
174  }
175  catch (...)
176  {
177  *Target = NULL;
178  }
179 
180  if (*Target == NULL)
181  CCopasiMessage ex(CCopasiMessage::EXCEPTION, MCopasiBase + 1, imax * sizeof(CType));
182  }
183  }
virtual size_t size() const
iterator begin()
#define MCopasiBase
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
virtual void cleanup()
virtual void resize(const size_t &newSize)
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
template<typename T>
iterator CCopasiVector< T >::end ( )
inline

Definition at line 191 of file CCopasiVector.h.

Referenced by CQLayoutScene::addGlyph(), CMathContainer::allocate(), CModel::appendDependentCompartments(), CModel::appendDependentEvents(), CFunctionDB::appendDependentFunctions(), CModel::appendDependentMetabolites(), CModel::appendDependentModelValues(), CModel::appendDependentReactions(), CCopasiDataModel::appendDependentTasks(), CMathModel::applyInitialValues(), SBMLImporter::applyStoichiometricExpressions(), CLayoutState::applyTo(), CSBMLExporter::assignSBMLIdsToReactions(), DataModelGUI::buildChangedObjects(), CModel::buildDependencyGraphs(), CMathModel::buildDependendRefreshList(), CModel::buildInitialRefreshSequence(), CModel::buildInitialSequence(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CSSAMethod::buildKineticMatrix(), CModel::buildNonSimulatedSequence(), CModel::buildSimulatedSequence(), CModel::buildStateTemplate(), CModel::buildStoi(), CModel::buildUserOrder(), CLNAMethod::calculateCovarianceMatrixReduced(), CModel::calculateElasticityMatrix(), CMCAMethod::calculateUnscaledElasticities(), CSBMLExporter::check_for_spatial_size_units(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForODESpeciesInNonfixedCompartment(), CFixLocalReactionParameters::checkModel(), CLayout::CLayout(), CLayoutState::CLayoutState(), CCopasiVector< CLGeneralGlyph >::cleanup(), CCopasiVector< CLGeneralGlyph >::clear(), CCopasiDataModel::commonAfterLoad(), CMathModel::compile(), CEvent::compile(), CMetab::compile(), CReaction::compile(), CMathEvent::compile(), CModel::compile(), CMathContainer::compileEvents(), CModel::compileEvents(), CMathObject::compilePropensity(), contains_necessary_mass_action_elements(), containsKey(), CModel::convert2NonReversible(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQConnectionGraphicsItem::CQConnectionGraphicsItem(), CSBMLExporter::createCompartments(), SBMLImporter::createCReactionFromReaction(), COutputAssistant::createDefaultOutput(), CSBMLExporter::createEvents(), CMathObject::createExtensiveReactionRateExpression(), CModelParameterSet::createFromModel(), CCopasiSpringLayout::createLayout(), CSBMLExporter::createMetabolites(), CSBMLExporter::createParameters(), CSBMLExporter::createReactions(), CQEventDM::data(), CQLayoutsWidget::enterProtected(), CSBMLExporter::exportEventAssignments(), CCopasiDataModel::exportMathModel(), CCopasiDataModel::exportMathModelToString(), CQLayoutScene::fillFromLayout(), CSBMLExporter::findAvogadro(), findObjectByDisplayName(), CChemEq::getCompartments(), CObjectLists::getEventTargets(), getFunctionForKey(), CObjectLists::getListOfConstObjects(), getMetabGlyphForKey(), CEFMTask::getNetReactionData(), getQuantityParameterOrValue(), CEFMTask::getSpeciesChanges(), getTextForItem(), CModel::getTreesWithDiscontinuities(), CFunctionDB::getUsedFunctions(), CSBMLExporter::hasVolumeAssignment(), CopasiPlot::initFromSpec(), QConservedSpeciesAnimation::initialize(), QFluxModeAnimation::initialize(), QTimeCourseAnimation::initialize(), CMathContainer::initializeMathObjects(), CModel::initializeMetabolites(), CSteadyStateMethod::isEquilibrium(), CSBMLExporter::isEventSBMLCompatible(), CSBMLExporter::isModelSBMLCompatible(), CTSSAMethod::isValidProblem(), CMCAMethod::isValidProblem(), CLNAMethod::isValidProblem(), CFunctionDB::listDependentTrees(), CQMoietiesTaskResult::load(), CQBrowserPaneDM::load(), StateSubwidget::loadCompartments(), CQEventWidget1::loadFromEvent(), CQPlotSubwidget::loadFromPlotSpec(), StateSubwidget::loadMetabolites(), StateSubwidget::loadModelValues(), StateSubwidget::loadReactions(), moveObject(), CEvent::mustBeDeleted(), CCopasiVector< CLGeneralGlyph >::operator=(), CMoietiesProblem::printResult(), CEFMProblem::printResult(), CFunctionDB::removeFunction(), SBMLImporter::removeUnusedFunctions(), CCopasiVector< CLGeneralGlyph >::resize(), CCopasiXML::saveModel(), CQEventWidget1::saveToEvent(), CMCAMethod::scaleMCA(), CQNewMainWindow::selectMetabolite(), CQNewMainWindow::selectReaction(), SBMLImporter::setInitialValues(), CChemEq::setMultiplicity(), CQParameterOverviewWidget::slotBtnNew(), CQParameterOverviewWidget::slotBtnSaveAs(), CTauLeapMethod::start(), CStochDirectMethod::start(), CTrajAdaptiveSA::start(), CTrajectoryMethodDsaLsodar::start(), CLayoutState::tagLayout(), CExperiment::updateFittedPointValues(), CExperiment::updateFittedPointValuesFromExtendedTimeSeries(), updateLayoutList(), CModel::updateMoietyValues(), updateRenderInformationList(), and CModel::updateSimulatedValues().

192  {return std::vector< CType * >::end();}
template<typename T>
const_iterator CCopasiVector< T >::end ( ) const
inline

Definition at line 194 of file CCopasiVector.h.

195  {return std::vector< CType * >::end();}
template<typename T>
virtual size_t CCopasiVector< T >::getIndex ( const CCopasiObject pObject) const
inlinevirtual

Retrieve the index of the pointed to object in the vector. If the object is not found C_INVALID_INDEX is returned.

Parameters
constCCopasiObject * pObject
Returns
size_t index

Definition at line 462 of file CCopasiVector.h.

Referenced by CQReportDefinition::btnDeleteReportClicked(), CLNAMethod::calculateCovarianceMatrixReduced(), CModel::createMetabolite(), CCopasiObject::getCN(), CCopasiVector< CLGeneralGlyph >::remove(), COutputDefinitionVector::removePlotSpec(), CReportDefinitionVector::removeReportDefinition(), CQReportDM::removeRows(), CQLayoutsDM::removeRows(), CHybridMethodODE45::setupBalances(), CHybridMethod::setupBalances(), CHybridMethodLSODA::setupBalances(), CStochMethod::setupDependencyGraphAndBalances(), and CHybridMethodODE45::setupMetab2React().

463  {
464  size_t i, imax = size();
465  const_iterator Target = begin();
466 
467  for (i = 0; i < imax; i++, Target++)
468  {
469  const CCopasiObject * pTarget = static_cast< const CCopasiObject * >(*Target);
470 
471  if (pTarget == pObject)
472  {
473  return i;
474  }
475  }
476 
477  return C_INVALID_INDEX;
478  }
virtual size_t size() const
iterator begin()
#define C_INVALID_INDEX
Definition: copasi.h:222
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
template<typename T>
virtual const CObjectInterface* CCopasiVector< T >::getObject ( const CCopasiObjectName name) const
inlinevirtual

Retrieve a the CCopasiObject with the given name.

Parameters
constCCopasiObjectName &name
Returns
const CObjectInterface * object

Reimplemented from CCopasiContainer.

Reimplemented in CCopasiVectorN< CType >, CCopasiVectorN< CReaction >, CCopasiVectorN< CEventAssignment >, CCopasiVectorN< CFunctionParameter >, CCopasiVectorN< CCopasiTask >, CCopasiVectorN< CPlotSpecification >, CCopasiVectorN< CCompartment >, CCopasiVectorN< CModelParameterSet >, CCopasiVectorN< CEvent >, CCopasiVectorN< CMetab >, CCopasiVectorN< CFunction >, CCopasiVectorN< CModelValue >, and CCopasiVectorN< CReportDefinition >.

Definition at line 364 of file CCopasiVector.h.

365  {
366  size_t Index = name.getElementIndex();
367 
368  if (Index < size())
369  {
370  CCopasiObject * pObject = *(begin() + Index);
371 
372  if (name.getObjectType() == pObject->getObjectType())
373  return pObject; //exact match of type and name
374 
375  if (name.getObjectName() == "")
376  return pObject; //cn contains no "="; type cannot be checked
377  }
378 
379  return NULL;
380  }
size_t getElementIndex(const size_t &pos=0) const
virtual size_t size() const
iterator begin()
const std::string & getObjectType() const
std::string getObjectType() const
std::string getObjectName() const
template<typename T>
CCopasiVector< CType >& CCopasiVector< T >::operator= ( const CCopasiVector< CType > &  rhs)
inline

Assignment operator. The effect of this operator is that both vectors will share the same objects. However, the parentship of the objects is not affected This means that the assigned vector must be used with some care.

Parameters
constCCopasiVector< CType > & rhs
Returns
CCopasiVector< CType > & lhs

Definition at line 124 of file CCopasiVector.h.

Referenced by CCopasiVectorN< CReportDefinition >::operator=().

125  {
126  cleanup();
127 
128  const_iterator it = rhs.begin();
129  const_iterator end = rhs.end();
130 
131  for (; it != end; ++it)
132  add(*it, false);
133 
134  return *this;
135  }
iterator begin()
iterator end()
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
virtual void cleanup()
virtual bool add(const CType &src)
template<typename T>
CCopasiVector< CType >& CCopasiVector< T >::operator= ( const std::vector< CType * > &  rhs)
inline

Assignment operator.

Parameters
conststd::vector< CType * > & rhs
Returns
CCopasiVector< CType > & lhs

Definition at line 142 of file CCopasiVector.h.

143  {
144  cleanup();
145 
146  typename std::vector< CType * >::const_iterator it = rhs.begin();
147  typename std::vector< CType * >::const_iterator end = rhs.end();
148 
149  for (; it != end; ++it)
150  add(*it, false);
151 
152  return *this;
153  }
iterator end()
virtual void cleanup()
virtual bool add(const CType &src)
template<typename T>
const value_type& CCopasiVector< T >::operator[] ( const size_t &  index) const
inline

Retrieve the indexed object.

Parameters
constsize_t & index
Returns
const value_type & object

Definition at line 338 of file CCopasiVector.h.

Referenced by CCopasiVectorN< CReportDefinition >::operator[]().

339  {
340  if (!(index < size()))
342 
343  return *(begin() + index);
344  }
virtual size_t size() const
iterator begin()
#define MCCopasiVector
template<typename T>
value_type& CCopasiVector< T >::operator[] ( const size_t &  index)
inline

Retrieve the indexed object.

Parameters
constsize_t & index
Returns
value_type & object

Definition at line 351 of file CCopasiVector.h.

352  {
353  if (!(index < size()))
355 
356  return *(begin() + index);
357  }
virtual size_t size() const
iterator begin()
#define MCCopasiVector
template<typename T>
virtual void CCopasiVector< T >::remove ( const size_t &  index)
inlinevirtual

Removes the index-th element from the vector

Parameters
constsize_t & index

Definition at line 287 of file CCopasiVector.h.

Referenced by CQReportDefinition::btnDeleteReportClicked(), contains_necessary_mass_action_elements(), SliderDialog::getCSlidersForObject(), CCopasiVectorN< CReportDefinition >::remove(), CMIRIAMInfo::removeBiologicalDescription(), CLRenderInformationBase::removeColorDefinition(), CMIRIAMInfo::removeCreator(), CCopasiRootContainer::removeDatamodel(), CLRenderInformationBase::removeGradientDefinition(), CLRenderInformationBase::removeLineEnding(), CModel::removeMetabolite(), CMIRIAMInfo::removeModification(), COutputDefinitionVector::removePlotSpec(), CMIRIAMInfo::removeReference(), CReportDefinitionVector::removeReportDefinition(), CQReportDM::removeRows(), SliderDialog::removeSlider(), and CQEventWidget1::slotDeleteTarget().

288  {
289  if (!(index < size()))
290  return;
291 
292  iterator Target = begin() + index;
293 
294  if (*Target)
295  {
296  if ((*Target)->getObjectParent() == this)
297  {
298  // (*Target)->cleanup();
299  delete *Target;
300  }
301  else
302  {
303  CCopasiContainer::remove(*Target);
304  std::vector< CType * >::erase(Target, Target + 1);
305  }
306  }
307  }
virtual size_t size() const
iterator begin()
virtual bool remove(CCopasiObject *pObject)
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
template<typename T>
virtual bool CCopasiVector< T >::remove ( CCopasiObject pObject)
inlinevirtual

Removes the pointed to object from the vector

Parameters
CCopasiObject* pObject
Returns
bool success

Reimplemented from CCopasiContainer.

Definition at line 314 of file CCopasiVector.h.

315  {
316  const size_t index = getIndex(pObject);
317 
318  bool success = true;
319 
320  if (index != C_INVALID_INDEX)
321  {
322  iterator Target = begin() + index;
323  std::vector< CType * >::erase(Target, Target + 1);
324  }
325  else
326  success = false;
327 
328  success &= CCopasiContainer::remove(pObject);
329 
330  return success;
331  }
iterator begin()
#define C_INVALID_INDEX
Definition: copasi.h:222
virtual bool remove(CCopasiObject *pObject)
virtual size_t getIndex(const CCopasiObject *pObject) const
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
template<typename T>
virtual void CCopasiVector< T >::resize ( const size_t &  newSize)
inlinevirtual

Resizes the vector but does not create new member objects

Parameters
constsize_t & newSize

Definition at line 393 of file CCopasiVector.h.

Referenced by CCopasiVector< CLGeneralGlyph >::deepCopy(), CModel::initializeMetabolites(), CCopasiVectorS< CMetabOld >::load(), CCopasiVectorNS< CMetab >::load(), CCSPMethod::predifineAnnotation(), CCSPMethod::setAnnotationM(), and CCSPMethod::start().

394  {
395  size_t OldSize = size();
396 
397  if (OldSize == newSize) return; // Nothing to do.
398 
399  if (OldSize < newSize)
400  {
401  std::vector< CType * >::resize(newSize);
402 
403  size_t i;
404  iterator Target = begin() + OldSize;
405 
406  for (i = OldSize; i < newSize; i++, Target++)
407  *Target = NULL;
408  }
409  else
410  {
411  iterator Target = begin() + newSize;
412  iterator End = end();
413 
414  for (; Target != End; Target++)
415  if (*Target)
416  {
417  if ((*Target)->getObjectParent() == this)
418  {
419  CCopasiContainer::remove(*Target);
420  (*Target)->setObjectParent(NULL);
421  delete *Target;
422  }
423  else
424  CCopasiContainer::remove(*Target);
425  }
426 
427  std::vector< CType * >::resize(newSize);
428  }
429  }
virtual size_t size() const
iterator begin()
iterator end()
virtual bool remove(CCopasiObject *pObject)
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
template<typename T>
virtual size_t CCopasiVector< T >::size ( ) const
inlinevirtual

Retrieves the size of the vector

Returns
size_t size

Definition at line 386 of file CCopasiVector.h.

Referenced by CModelAdd::addCompartments(), CModelAdd::addCompartmentsExpressions(), CChemEq::addElement(), CModelAdd::addEvents(), CQNewMainWindow::addGlobalRenderInfoItemsToList(), test000097::addGlobalRenderInformation(), test000097::addLocalRenderInformation(), CModelAdd::addMetabolites(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValues(), CModelAdd::addModelValuesExpressions(), CModelAdd::addReactions(), CLGradientBase::addSBMLAttributes(), CLRenderInformationBase::addSBMLAttributes(), CMathEventN::allocate(), CMathContainer::allocate(), CQReportDefinition::btnDeleteReportClicked(), CSSAMethod::buildKineticMatrix(), CModel::buildStateTemplate(), CModel::buildStoi(), CModel::buildUserOrder(), CLayout::calculateBoundingBox(), CLNAMethod::calculateCovarianceMatrixReduced(), CModel::calculateDerivatives(), CModel::calculateDerivativesX(), CMCAMethod::calculateUnscaledElasticities(), CCopasiVector< CLGeneralGlyph >::CCopasiVector(), CSBMLExporter::checkForEvents(), CSBMLExporter::checkForPiecewiseFunctions(), CHybridMethod::checkModel(), CHybridMethodLSODA::checkModel(), CHybridMethodODE45::checkModel(), CModelAnalyzer::checkReaction(), CLayout::CLayout(), CCopasiVector< CLGeneralGlyph >::clear(), CLGeneralGlyph::CLGeneralGlyph(), CLGroup::CLGroup(), CModel::CModel(), CSBMLExporter::collectIds(), COutputHandlerPlot::compile(), CopasiPlot::compile(), CChemEqInterface::completeCompartments(), CReactionInterface::connectNonMetabolites(), contains_necessary_mass_action_elements(), CModel::convert2NonReversible(), SBMLDocumentLoader::convertRenderInformationReferencesIds(), CArrayAnnotation::createAnnotationsCNFromCopasiVector(), SBMLImporter::createCFunctionFromFunctionDefinition(), SBMLImporter::createCModelFromSBMLDocument(), SBMLImporter::createCReactionFromReaction(), CSEDMLExporter::createDataGenerators(), COutputAssistant::createDefaultOutput(), CPlotSpecification::createDefaultPlot(), CQGLNetworkPainter::createGraph(), CSBMLExporter::createKineticLaw(), CCopasiSpringLayout::createLayout(), CModel::createMetabolite(), test000097::createModel(), CKinFunction::createParameters(), COutputDefinitionVector::createPlotSpec(), CSBMLExporter::createReaction(), CLayoutInitializer::createReactionGlyph(), CReportDefinitionVector::createReportDefinition(), CSBMLExporter::createTimesTree(), CCopasiSpringLayout::createVariables(), CCSPMethod::CSPImportanceIndex(), CCSPMethod::CSPParticipationIndex(), CCSPMethod::CSPradicalPointer(), CCSPMethod::cspstep(), CQPlotDM::data(), CQSpecieDM::data(), CCopasiVector< CLGeneralGlyph >::deepCopy(), CQPlotSubwidget::deletePlot(), CModel::determineIsAutonomous(), SBMLImporter::doMapping(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateReaction(), CQNewMainWindow::elementaryModeTriggeredSlot(), CFitProblem::elevateChildren(), CCopasiXMLParser::ListOfFunctionsElement::end(), CQLayoutsWidget::enterProtected(), SliderDialog::equivalentSliderExists(), CObjectLists::existsFixedMetab(), CODEExporter::exportCompartments(), CODEExporter::exportKineticFunction(), CODEExporterC::exportKineticFunctionGroup(), CODEExporter::exportMetabolites(), CODEExporter::exportMetabolitesConcentrations(), CODEExporter::exportModelValues(), CODEExporter::exportModelValuesExpressions(), CODEExporter::exportODEs(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CLayout::exportToDotFile(), CListOfLayouts::exportToSBML(), CLayout::exportToSBML(), CLGeneralGlyph::exportToSBML(), CLReactionGlyph::exportToSBML(), CModelExpansion::SetOfModelElements::fillComplete(), CQMergingData::fillTree(), CQSelectionWizardPage::fillTree(), CCopasiSpringLayout::finalizeState(), CCopasiSpringLayout::findCompartmentForReactionNode(), SBMLImporter::findCorrespondingFunction(), findFunction(), CFunctionDB::findLoadFunction(), CModel::findMetabByName(), CModel::findMoiety(), CFunctionParameters::findParameterByName(), CLRenderFlattener::flatten(), CStochMethod::generateReactionIndex(), CStochMethod::getAffects(), CLRenderInformationBase::getColorDefinition(), CChemEqInterface::getCompartment(), SliderDialog::getCSlidersForObject(), CHybridMethodODE45::getDefaultAtol(), CHybridMethodLSODA::getDefaultAtol(), CStochMethod::getDependsOn(), CMetabNameInterface::getDisplayName(), CLGroup::getElement(), Arguments::getFirstScheduledTask(), CLRenderInformationBase::getGradientDefinition(), CLGradientBase::getGradientStop(), CCopasiVector< CLGeneralGlyph >::getIndex(), CCopasiVectorN< CReportDefinition >::getIndex(), CChemEq::getLargestCompartment(), CLRenderInformationBase::getLineEnding(), ParameterTable::getListOfAllCompartmentNames(), ParameterTable::getListOfAllMetabNames(), CChemEq::getMolecularity(), CFunctionParameters::getNumberOfParametersByUsage(), CLRenderInformationBase::getNumColorDefinitions(), getNumDefaultStyles(), CLGroup::getNumElements(), CLRenderInformationBase::getNumGradientDefinitions(), CLGradientBase::getNumGradientStops(), CLRenderInformationBase::getNumLineEndings(), CModel::getNumMetabs(), CModel::getNumModelValues(), CLLocalRenderInformation::getNumStyles(), CLGlobalRenderInformation::getNumStyles(), CCopasiVector< CLGeneralGlyph >::getObject(), SEDMLUtils::getObjectForSbmlId(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CFunctionParameters::getParameterByUsage(), CCopasiSpringLayout::getPotential(), getReactionIndex(), CListOfLayouts::getRenderInformation(), CLayout::getRenderInformation(), QConservedSpeciesAnimation::getScales(), CLLocalRenderInformation::getStyle(), CLGlobalRenderInformation::getStyle(), Arguments::getTaskForName(), CModel::getTotSteps(), Arguments::handleCommandLine(), hasLayout(), CModel::hasReversibleReaction(), CMathContainer::init(), CCopasiSpringLayout::initFromLayout(), CopasiPlot::initFromSpec(), CMathReaction::initialize(), QConservedSpeciesAnimation::initialize(), CTSSAMethod::initializeIntegrationsParameter(), CModel::initializeMetabolites(), CLsodaMethod::initializeParameter(), CQLayoutScene::initializeResolver(), CHybridMethod::initMethod(), CHybridMethodODE45::initMethod(), CHybridMethodLSODA::initMethod(), CQParameterSetsDM::insertRows(), CQLayoutsDM::insertRows(), CQSpecieDM::insertRows(), CReactionInterface::isLocked(), SBMLImporter::isMassActionExpression(), CQSimpleSelectionTree::isMetaboliteNameUnique(), CMetabNameInterface::isUnique(), CTSSAMethod::isValidProblem(), CTauLeapMethod::isValidProblem(), CHybridMethod::isValidProblem(), CHybridMethodODE45::isValidProblem(), CCopasiMethod::isValidProblem(), CHybridMethodLSODA::isValidProblem(), CStochDirectMethod::isValidProblem(), CLNAMethod::isValidProblem(), CStochMethod::isValidProblem(), CTrajectoryMethodDsaLsodar::isValidProblem(), CFunctionParameters::isVector(), CODEExporterC::KineticFunction2ODEmember(), CMMLOutput::listReactionsForMetab(), CQSpeciesDetail::load(), CQExpandModelData::load(), CModel::load(), ObjectBrowserWidget::loadChild(), StateSubwidget::loadCompartments(), ObjectBrowserWidget::loadField(), CChemEqInterface::loadFromChemEq(), CQEventWidget1::loadFromEvent(), CQPlotSubwidget::loadFromPlotSpec(), StateSubwidget::loadMetabolites(), CQCompartment::loadMetaboliteTable(), StateSubwidget::loadModelValues(), CQUpdatesWidget::loadObjectsTable(), StateSubwidget::loadReactions(), CQReportDefinitionSelect::loadReportDefinitionVector(), CQLayoutMainWindow::loadSBMLFile(), main(), CModelMerging::mergeMetabolites(), CStochMethod::modelHasAssignments(), CHybridMethod::modelHasAssignments(), CHybridMethodLSODA::modelHasAssignments(), CHybridMethodODE45::modelHasAssignments(), CLayout::moveBy(), CLGeneralGlyph::moveBy(), CLReactionGlyph::moveBy(), stress_test::normalizeAndSimplifyExpressions(), stress_test::normalizeFunctionDB(), CReaction::object2variable(), operator<<(), CLGeneralGlyph::operator=(), CLReactionGlyph::operator=(), CCopasiVector< CLGeneralGlyph >::operator[](), CHybridMethod::outputData(), CHybridMethodODE45::outputData(), CHybridMethodLSODA::outputData(), CHybridMethod::outputDebug(), CHybridMethodODE45::outputDebug(), CHybridMethodLSODA::outputDebug(), placeTextGlyphs(), CQSimpleSelectionTree::populateTree(), CCSPMethod::predifineAnnotation(), Arguments::prepareModel(), CODEExporterC::preprocess(), CODEExporter::preprocess(), CModel::printParameterOverview(), CCSPMethod::printResult(), CCopasiSpringLayout::randomize(), CModelAdd::reactionInvolvesCompartment(), CQSpeciesWidget::refreshCompartments(), CCopasiVector< CLGeneralGlyph >::remove(), CLRenderInformationBase::removeColorDefinition(), CLRenderInformationBase::removeGradientDefinition(), CLRenderInformationBase::removeLineEnding(), CCopasiDataModel::removeSBMLIdFromFunctions(), SliderDialog::removeSlider(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInEvent(), CModelExpansion::replaceInModel(), CModelExpansion::replaceInReaction(), CCopasiVector< CLGeneralGlyph >::resize(), CQParameterSetsDM::rowCount(), CQLayoutsDM::rowCount(), CQModifiedDM::rowCount(), CQReferenceDM::rowCount(), CQBiologicalDescriptionDM::rowCount(), CQCreatorDM::rowCount(), CQFunctionDM::rowCount(), CQFittingWidget::runTask(), CCopasiXML::saveFunctionList(), CCopasiXML::saveGUI(), CCopasiXML::saveLayoutList(), CCopasiXML::saveListOfGlobalRenderInformation(), CCopasiXML::saveListOfLocalRenderInformation(), CCopasiXML::saveModel(), CCopasiXML::savePlotList(), CCopasiXML::saveReportList(), CCopasiXML::saveTaskList(), CQEventWidget1::saveToEvent(), CILDMMethod::setAnnotationM(), CCSPMethod::setAnnotationM(), ConverterASTNode::setChildren(), SBMLImporter::setCorrectUsage(), CLLayoutRenderer::setDeduceSpeciesReferenceRoles(), CModel::setQuantityUnit(), CReaction::setScalingFactor(), COptProblem::setSubtaskType(), CQEFMSpeciesDM::setTask(), CHybridMethodODE45::setupBalances(), CHybridMethod::setupBalances(), CHybridMethodLSODA::setupBalances(), CHybridMethodODE45::setupDependencyGraph(), CHybridMethod::setupDependencyGraph(), CHybridMethodLSODA::setupDependencyGraph(), CStochMethod::setupDependencyGraphAndBalances(), CHybridMethodODE45::setupMetab2React(), CHybridMethod::setupMetab2React(), CHybridMethodLSODA::setupMetab2React(), CHybridMethod::setupMetab2ReactComplete(), CHybridMethodLSODA::setupMetab2ReactComplete(), CHybridMethod::setupMetab2ReactPlusModifier(), CHybridMethodLSODA::setupMetab2ReactPlusModifier(), CStochNextReactionMethod::setupPriorityQueue(), CHybridMethod::setupPriorityQueue(), CHybridMethodLSODA::setupPriorityQueue(), CILDMMethod::setVectors(), CCSPMethod::setVectors(), CCSPMethod::setVectorsToNaN(), CModelMerging::simpleCall(), CFunctionParameters::size(), CQEventWidget1::slotActualizeAssignmentExpression(), CQEventWidget1::slotAddTarget(), CQPlotsWidget::slotBtnActivateAllClicked(), CQMiriamWidget::slotBtnBrowseDescription(), CQMiriamWidget::slotBtnBrowseReference(), CQPlotsWidget::slotBtnDeactivateAllClicked(), CQSpeciesDetail::slotBtnNew(), CQLayoutsWidget::slotBtnNewClicked(), CQNewMainWindow::slotCalculateDimensions(), CQExpandModelData::slotCompartmentActivated(), CQMoietiesTaskResult::slotCreateGlobalQuantity(), CQEventWidget1::slotDeleteTarget(), CQNewMainWindow::slotRenderInfoChanged(), CQLayoutView::slotRenderInformationChanged(), CQNewMainWindow::slotRunRandomizeLayout(), CTauLeapMethod::start(), CStochDirectMethod::start(), CCSPMethod::start(), CTrajAdaptiveSA::start(), CStochMethod::start(), CTrajectoryMethodDsaLsodar::start(), CCopasiXMLParser::LocalRenderInformationElement::start(), CCopasiXMLParser::GlobalRenderInformationElement::start(), CModel::suitableForStochasticSimulation(), CFunctionDB::suitableFunctions(), CCopasiVector< CLGeneralGlyph >::swap(), CQFittingWidget::taskFinishedEvent(), test000069::test_bug1069(), test000073::test_bug1087(), test000093::test_bug1503_1(), test000093::test_bug1503_2(), test000060::test_bug_1026(), test000061::test_bug_1044(), test000091::test_delay_in_kinetic_law(), test000091::test_delay_in_kinetic_law_local_parameter(), test000021::test_hasOnlySubstanceUnits(), test000027::test_hasOnlySubstanceUnits(), test000029::test_hasOnlySubstanceUnits(), test000039::test_hasOnlySubstanceUnits(), test000030::test_hasOnlySubstanceUnits(), test000032::test_hasOnlySubstanceUnits(), test000035::test_hasOnlySubstanceUnits(), test000031::test_hasOnlySubstanceUnits(), test000034::test_hasOnlySubstanceUnits(), test000025::test_hasOnlySubstanceUnits(), test000038::test_hasOnlySubstanceUnits(), test000033::test_hasOnlySubstanceUnits(), test000036::test_hasOnlySubstanceUnits(), test000037::test_hasOnlySubstanceUnits(), test000040::test_hasOnlySubstanceUnits(), test000022::test_hasOnlySubstanceUnits(), test000028::test_hasOnlySubstanceUnits(), test000024::test_hasOnlySubstanceUnits(), test000023::test_hasOnlySubstanceUnits(), test000041::test_hasOnlySubstanceUnits(), test000026::test_hasOnlySubstanceUnits(), test000042::test_hasOnlySubstanceUnits(), test000043::test_hasOnlySubstanceUnits(), test000088::test_import_assignment_without_expression(), test000088::test_import_eventassignment_without_expression(), test000097::test_import_global_render_information(), test000088::test_import_initialassignment_without_expression(), test000097::test_import_local_render_information(), test000087::test_import_reaction_flux_reference_2(), test000097::test_importexport_global_render_information(), test000097::test_importexport_local_render_information(), test000097::test_importwrite_global_render_information(), test000097::test_importwrite_local_render_information(), test000078::test_l2v4_import_unordered_functions(), test000080::test_mass_action_recognition_bug(), test000092::test_miriam_export_7(), test000092::test_miriam_export_8(), test000092::test_miriam_export_9(), test000092::test_miriam_import_1(), test000097::test_read_global_render_information(), test000097::test_read_local_render_information(), test000097::test_readexport_global_render_information(), test000097::test_readexport_local_render_information(), test000097::test_readwrite_global_render_information(), test000097::test_readwrite_local_render_information(), test000087::test_simulate_reaction_flux_reference_1(), test000044::test_stoichiometricExpression(), test000045::test_stoichiometricExpression(), test000046::test_stoichiometricExpression(), CLLocalRenderInformation::toSBML(), CLGlobalRenderInformation::toSBML(), CLGroup::toSBML(), CLLayoutRenderer::update_associations(), CQNewMainWindow::updateLayoutList(), CSBMLExporter::updateMIRIAMAnnotation(), CHybridMethod::updatePriorityQueue(), CHybridMethodLSODA::updatePriorityQueue(), updateRenderInformationList(), CQNewMainWindow::updateRenderInformationList(), validate(), CMMLOutput::writeDifferentialEquations(), and CMMLOutput::writeRHS().

387  {return std::vector< CType * >::size();}
template<typename T>
virtual void CCopasiVector< T >::swap ( const size_t &  indexFrom,
const size_t &  indexTo 
)
inlinevirtual

Swap two objects in the vector.

Parameters
constsize_t & indexFrom
constsize_t & indexTo

Definition at line 250 of file CCopasiVector.h.

Referenced by CFunctionParameters::swap().

251  {
252  size_t Size = size();
253 
254  if (!(indexFrom < Size))
255  CCopasiMessage ex(CCopasiMessage::EXCEPTION, MCCopasiVector + 3, indexFrom, Size - 1);
256 
257  if (!(indexTo < Size))
258  CCopasiMessage ex(CCopasiMessage::EXCEPTION, MCCopasiVector + 3, indexTo, Size - 1);
259 
260  iterator from = begin() + indexFrom;
261  iterator to = begin() + indexTo;
262 
263  value_type tmp = *from;
264  *from = *to;
265  *to = tmp;
266  }
virtual size_t size() const
iterator begin()
std::vector< CType * >::value_type value_type
Definition: CCopasiVector.h:55
std::vector< CType * >::iterator iterator
Definition: CCopasiVector.h:56
#define MCCopasiVector

Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
const CCopasiVector< CType > &  d 
)
friend

ostream operator

Parameters
std::ostream& os
constCCopasiVector<CType> & d
Returns
std::ostream & os

Definition at line 870 of file CCopasiVector.h.

871 {
872  os << " +++Vektor; size: " << d.size() << std::endl;
873 
874  unsigned int i;
875 
876  for (i = 0; i < d.size(); i++)
877  os << " " << *(d[i]);
878 
879  if (d.size() == 0)
880  os << " empty" << std::endl;
881 
882  os << " ---Vektor" << std::endl;
883 
884  return os;
885 }
virtual size_t size() const

The documentation for this class was generated from the following files: