COPASI API  4.16.103
Classes | Functions
CCopasiObject.h File Reference
#include <string>
#include <iostream>
#include <vector>
#include <set>
#include <list>
#include "copasi/copasi.h"
#include "copasi/math/CMathEnum.h"
Include dependency graph for CCopasiObject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CCopasiMatrixReference< CType >
 
class  CCopasiObject
 
class  CCopasiObjectReference< CType >
 
class  CCopasiVectorReference< CType >
 
class  CObjectInterface
 
class  Refresh
 
class  RefreshTemplate< CClass >
 
class  SpecificUpdateMethod< CType, VType >
 
class  UpdateMethod
 

Functions

template<class CType >
CCopasiMatrixReference< CType > * createMatrixReference (const std::string &name, const CCopasiContainer *pParent, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectReference< CType > * createReference (const std::string &name, const CCopasiContainer *pParent, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiVectorReference< CType > * createVectorReference (const std::string &name, const CCopasiContainer *pParent, CType &reference, const unsigned C_INT32 &flag=0)
 
template<typename ForwardAccessIterator >
std::list< const CCopasiObject * > sortObjectsByDependency (ForwardAccessIterator begin, ForwardAccessIterator end, const CCopasiObject::DataObjectSet &context)
 

Function Documentation

template<class CType >
CCopasiMatrixReference< CType >* createMatrixReference ( const std::string &  name,
const CCopasiContainer pParent,
CType &  reference,
const unsigned C_INT32 flag = 0 
)

Definition at line 587 of file CCopasiObject.h.

Referenced by CCopasiContainer::addMatrixReference().

591 {return new CCopasiMatrixReference< CType >(name, pParent, reference, flag);}
long int flag
Definition: f2c.h:52
template<class CType >
CCopasiObjectReference< CType >* createReference ( const std::string &  name,
const CCopasiContainer pParent,
CType &  reference,
const unsigned C_INT32 flag = 0 
)

Definition at line 573 of file CCopasiObject.h.

Referenced by CCopasiContainer::addObjectReference().

577 {return new CCopasiObjectReference< CType >(name, pParent, reference, flag);}
long int flag
Definition: f2c.h:52
template<class CType >
CCopasiVectorReference< CType >* createVectorReference ( const std::string &  name,
const CCopasiContainer pParent,
CType &  reference,
const unsigned C_INT32 flag = 0 
)

Definition at line 580 of file CCopasiObject.h.

Referenced by CCopasiContainer::addVectorReference().

584 {return new CCopasiVectorReference< CType >(name, pParent, reference, flag);}
long int flag
Definition: f2c.h:52
template<typename ForwardAccessIterator >
std::list< const CCopasiObject * > sortObjectsByDependency ( ForwardAccessIterator  begin,
ForwardAccessIterator  end,
const CCopasiObject::DataObjectSet context 
)

Sort the CCopasiObjects in the interval [begin, end) according to their dependencies

Parameters
ForwardAccessIteratorbegin
ForwardAccessIteratorend
constDataObjectSet & context
Returns
std::list< const CCopasiObject * >

Definition at line 602 of file CCopasiObject.h.

Referenced by CModel::buildInitialRefreshSequence(), and CCopasiObject::buildUpdateSequence().

605 {
606  std::list< const CCopasiObject * > SortedList;
607  std::list< const CCopasiObject * >::iterator itList;
608  std::list< const CCopasiObject * >::iterator endList;
609 
610  CCopasiObject::DataObjectSet AllDependencies;
611  std::list< CCopasiObject::DataObjectSet > DependencySet;
612  std::list< CCopasiObject::DataObjectSet >::iterator itDependencies;
613 
614  for (; begin != end; ++begin)
615  {
616  AllDependencies.clear();
617  (*begin)->getAllDependencies(AllDependencies, context);
618 
619  itList = SortedList.begin();
620  endList = SortedList.end();
621  itDependencies = DependencySet.begin();
622 
623  for (; itList != endList; ++itList, ++itDependencies)
624  if (itDependencies->count(*begin)) break;
625 
626  SortedList.insert(itList, *begin);
627  DependencySet.insert(itDependencies, AllDependencies);
628  }
629 
630  return SortedList;
631 }
std::set< const CCopasiObject * > DataObjectSet