COPASI API  4.16.103
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CMIRIAMResource Class Reference

#include <CMIRIAMResource.h>

Inheritance diagram for CMIRIAMResource:
Inheritance graph
[legend]
Collaboration diagram for CMIRIAMResource:
Collaboration graph
[legend]

Public Member Functions

void addDeprecatedURL (const std::string &URL)
 
 CMIRIAMResource (const std::string &name="MIRIAM Resource", const CCopasiContainer *pParent=NULL)
 
 CMIRIAMResource (const CMIRIAMResource &src, const CCopasiContainer *pParent=NULL)
 
 CMIRIAMResource (const CCopasiParameterGroup &group, const CCopasiContainer *pParent=NULL)
 
std::string getIdentifiersOrgURL () const
 
const bool & getMIRIAMCitation () const
 
const CCopasiParameterGroupgetMIRIAMDeprecated () const
 
const std::string & getMIRIAMDisplayName () const
 
const CMIRIAMResourcegetMIRIAMMIRIAMResource () const
 
const std::string & getMIRIAMPattern () const
 
const std::string & getMIRIAMURI () const
 
void setMIRIAMCitation (const bool &isCitation)
 
void setMIRIAMDisplayName (const std::string &displayName)
 
void setMIRIAMPattern (const std::string &pattern)
 
void setMIRIAMURI (const std::string &URI)
 
virtual ~CMIRIAMResource ()
 
- Public Member Functions inherited from CCopasiParameterGroup
bool addGroup (const std::string &name)
 
bool addParameter (const CCopasiParameter &parameter)
 
bool addParameter (const std::string &name, const CCopasiParameter::Type type)
 
template<class CType >
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value)
 
void addParameter (CCopasiParameter *pParameter)
 
CCopasiParameterGroupassertGroup (const std::string &name)
 
template<class CType >
CCopasiParameterassertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
 
index_iterator beginIndex () const
 
name_iterator beginName () const
 
 CCopasiParameterGroup (const CCopasiParameterGroup &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameterGroup (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &objectType="ParameterGroup")
 
void clear ()
 
virtual bool elevateChildren ()
 
index_iterator endIndex () const
 
name_iterator endName () const
 
CCopasiParameterGroupgetGroup (const std::string &name)
 
const CCopasiParameterGroupgetGroup (const std::string &name) const
 
CCopasiParameterGroupgetGroup (const size_t &index)
 
const CCopasiParameterGroupgetGroup (const size_t &index) const
 
size_t getIndex (const std::string &name) const
 
std::string getKey (const std::string &name) const
 
std::string getKey (const size_t &index) const
 
virtual const std::string & getName (const size_t &index) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
CCopasiParametergetParameter (const std::string &name)
 
const CCopasiParametergetParameter (const std::string &name) const
 
CCopasiParametergetParameter (const size_t &index)
 
const CCopasiParametergetParameter (const size_t &index) const
 
CCopasiParameter::Type getType (const std::string &name) const
 
CCopasiParameter::Type getType (const size_t &index) const
 
std::string getUniqueParameterName (const CCopasiParameter *pParameter) const
 
const CCopasiParameter::ValuegetValue (const std::string &name) const
 
const CCopasiParameter::ValuegetValue (const size_t &index) const
 
CCopasiParameter::ValuegetValue (const std::string &name)
 
CCopasiParameter::ValuegetValue (const size_t &index)
 
CCopasiParameterGroupoperator= (const CCopasiParameterGroup &rhs)
 
virtual void print (std::ostream *ostream) const
 
bool removeParameter (const std::string &name)
 
bool removeParameter (const size_t &index)
 
template<class CType >
bool setValue (const std::string &name, const CType &value)
 
template<class CType >
bool setValue (const size_t &index, const CType &value)
 
size_t size () const
 
bool swap (const size_t &iFrom, const size_t &iTo)
 
bool swap (index_iterator &from, index_iterator &to)
 
virtual ~CCopasiParameterGroup ()
 
- Public Member Functions inherited from CCopasiParameter
 CCopasiParameter (const CCopasiParameter &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CCopasiContainer *pParent=NULL, const std::string &objectType="Parameter")
 
virtual CCopasiObjectName getCN () const
 
virtual const std::string & getKey () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const CCopasiParameter::TypegetType () const
 
const ValuegetValue () const
 
ValuegetValue ()
 
virtual voidgetValuePointer () const
 
CCopasiObjectgetValueReference () const
 
bool isValidValue (const C_FLOAT64 &value) const
 
bool isValidValue (const C_INT32 &value) const
 
bool isValidValue (const unsigned C_INT32 &value) const
 
bool isValidValue (const bool &value) const
 
bool isValidValue (const std::string &value) const
 
bool isValidValue (const CCopasiObjectName &value) const
 
bool isValidValue (const std::vector< CCopasiParameter * > &value) const
 
CCopasiParameteroperator= (const CCopasiParameter &rhs)
 
template<class CType >
bool setValue (const CType &value)
 
bool setValue (const std::vector< CCopasiParameter * > &value)
 
virtual ~CCopasiParameter ()
 
- 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 bool remove (CCopasiObject *pObject)
 
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 const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () 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
 
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 ()
 

Private Member Functions

void initializeParameter ()
 

Private Attributes

bool * mpCitation
 
CCopasiParameterGroupmpDeprecated
 
std::string * mpDisplayName
 
std::string * mpPattern
 
std::string * mpURI
 

Additional Inherited Members

- Public Types inherited from CCopasiParameterGroup
typedef parameterGroup::iterator index_iterator
 
typedef
CCopasiContainer::objectMap::iterator 
name_iterator
 
typedef std::vector
< CCopasiParameter * > 
parameterGroup
 
- Public Types inherited from CCopasiParameter
enum  Type {
  DOUBLE = 0, UDOUBLE, INT, UINT,
  BOOL, GROUP, STRING, CN,
  KEY, FILE, EXPRESSION, INVALID
}
 
- 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
 
- 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 CCopasiParameter
static const std::string TypeName []
 
static const char * XMLType []
 
- 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 CCopasiParameterGroup
 CCopasiParameterGroup ()
 
- 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 CCopasiParameter
std::string mKey
 
CCopasiObjectmpValueReference
 
size_t mSize
 
Value mValue
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 33 of file CMIRIAMResource.h.

Constructor & Destructor Documentation

CMIRIAMResource::CMIRIAMResource ( const std::string &  name = "MIRIAM Resource",
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters
conststd::string & name (default: MIRIAM Resource)
constCCopasiContainer * pParent (default: NULL)

Definition at line 470 of file CMIRIAMResource.cpp.

References initializeParameter().

471  :
472  CCopasiParameterGroup(name, pParent),
473  mpDisplayName(NULL),
474  mpURI(NULL),
475  mpCitation(NULL),
476  mpDeprecated(NULL)
CCopasiParameterGroup * mpDeprecated
std::string * mpDisplayName
std::string * mpURI
CMIRIAMResource::CMIRIAMResource ( const CMIRIAMResource src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters
constCMIRIAMResource & src
constCCopasiContainer * pParent (default: NULL)

Definition at line 479 of file CMIRIAMResource.cpp.

References initializeParameter().

480  :
481  CCopasiParameterGroup(src, pParent),
482  mpDisplayName(NULL),
483  mpURI(NULL),
484  mpCitation(NULL),
485  mpDeprecated(NULL)
CCopasiParameterGroup * mpDeprecated
std::string * mpDisplayName
std::string * mpURI
CMIRIAMResource::CMIRIAMResource ( const CCopasiParameterGroup group,
const CCopasiContainer pParent = NULL 
)

Specific constructor

Parameters
constCCopasiParameterGroup & group
constCCopasiContainer * pParent (default: NULL)

Definition at line 488 of file CMIRIAMResource.cpp.

References initializeParameter().

489  :
490  CCopasiParameterGroup(group, pParent),
491  mpDisplayName(NULL),
492  mpURI(NULL),
493  mpCitation(NULL),
494  mpDeprecated(NULL)
CCopasiParameterGroup * mpDeprecated
std::string * mpDisplayName
std::string * mpURI
CMIRIAMResource::~CMIRIAMResource ( )
virtual

Destructor

Definition at line 510 of file CMIRIAMResource.cpp.

511 {}

Member Function Documentation

void CMIRIAMResource::addDeprecatedURL ( const std::string &  URL)

Add a deprecated URL to the MIRIAM Resource

Parameters
conststd::string & URL

Definition at line 565 of file CMIRIAMResource.cpp.

References CCopasiParameterGroup::addParameter(), mpDeprecated, and CCopasiParameter::STRING.

Referenced by CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

CCopasiParameterGroup * mpDeprecated
bool addParameter(const CCopasiParameter &parameter)
std::string CMIRIAMResource::getIdentifiersOrgURL ( ) const

Retrieve the identifiers.org URL of the MIRIAM Resource.

Returns
std::string URL

Definition at line 548 of file CMIRIAMResource.cpp.

References mpURI.

Referenced by CMIRIAMResources::createURIMap(), CMIRIAMResourceObject::extractId(), and CMIRIAMResourceObject::getIdentifiersOrgURL().

549 {
550  return "http://identifiers.org/" + mpURI->substr(11);
551 }
std::string * mpURI
const bool & CMIRIAMResource::getMIRIAMCitation ( ) const

Retrieve whether the resource can be used as reference.

Returns
const bool & isCitation

Definition at line 562 of file CMIRIAMResource.cpp.

References mpCitation.

Referenced by CQMiriamWidget::updateResourcesList().

563 {return * mpCitation;}
const CCopasiParameterGroup & CMIRIAMResource::getMIRIAMDeprecated ( ) const

Retrieve the deprecated URL of the MIRIAM Resource

Returns
const CCopasiParameterGroup & deprecatedURLs

Definition at line 568 of file CMIRIAMResource.cpp.

References mpDeprecated.

Referenced by CMIRIAMResources::createURIMap().

569 {return * mpDeprecated;}
CCopasiParameterGroup * mpDeprecated
const std::string & CMIRIAMResource::getMIRIAMDisplayName ( ) const

Retrieve the Display Name of the MIRIAM Resource.

Returns
const std::string & DisplayName

Definition at line 539 of file CMIRIAMResource.cpp.

References mpDisplayName.

Referenced by CMIRIAMResources::createDisplayNameMap(), and CQMiriamWidget::updateResourcesList().

540 {return *mpDisplayName;}
std::string * mpDisplayName
const CMIRIAMResource & CMIRIAMResource::getMIRIAMMIRIAMResource ( ) const

Retrieve the list of MIRIAM Resource.

Returns
const CMIRIAMResource & MIRIAMResource

Definition at line 533 of file CMIRIAMResource.cpp.

534 {return * this;}
const std::string & CMIRIAMResource::getMIRIAMPattern ( ) const

Retrieve the Pattern of the MIRIAM Resource.

Returns
std::string & Pattern

Definition at line 556 of file CMIRIAMResource.cpp.

References mpPattern.

557 {return * mpPattern;}
std::string * mpPattern
const std::string & CMIRIAMResource::getMIRIAMURI ( ) const

Retrieve the URI of the MIRIAM Resource.

Returns
const std::string & URI

Definition at line 545 of file CMIRIAMResource.cpp.

References mpURI.

Referenced by CMIRIAMResources::createURIMap(), and CMIRIAMResourceObject::extractId().

546 {return * mpURI;}
std::string * mpURI
void CMIRIAMResource::initializeParameter ( )
private

Allocates all group parameters and assures that they are properly initialized.

Definition at line 497 of file CMIRIAMResource.cpp.

References CCopasiParameterGroup::assertGroup(), CCopasiParameterGroup::assertParameter(), CCopasiParameter::BOOL, CCopasiParameter::getValue(), mpCitation, mpDeprecated, mpDisplayName, mpPattern, mpURI, CCopasiParameter::Value::pBOOL, CCopasiParameter::Value::pSTRING, and CCopasiParameter::STRING.

Referenced by CMIRIAMResource().

498 {
500  (std::string) "")->getValue().pSTRING;
502  (std::string) "")->getValue().pSTRING;
504  (std::string) "")->getValue().pSTRING;
506  false)->getValue().pBOOL;
507  mpDeprecated = assertGroup("Deprecated");
508 }
CCopasiParameterGroup * mpDeprecated
std::string * mpDisplayName
std::string * mpURI
const Value & getValue() const
CCopasiParameterGroup * assertGroup(const std::string &name)
std::string * mpPattern
CCopasiParameter * assertParameter(const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
void CMIRIAMResource::setMIRIAMCitation ( const bool &  isCitation)

Set whether the resource can be used as reference.

Parameters
constbool & isCitation

Definition at line 559 of file CMIRIAMResource.cpp.

References mpCitation.

Referenced by CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

560 {*mpCitation = citation;}
void CMIRIAMResource::setMIRIAMDisplayName ( const std::string &  displayName)

Set the Display Name of the MIRIAM Resource.

Parameters
conststd::string & DisplayName

Definition at line 536 of file CMIRIAMResource.cpp.

References mpDisplayName.

Referenced by CCopasiRootContainer::initializeChildren(), CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

537 {*mpDisplayName = displayName;}
std::string * mpDisplayName
void CMIRIAMResource::setMIRIAMPattern ( const std::string &  pattern)

Set the Pattern of the MIRIAM Resource.

Parameters
conststd::string & Pattern

Definition at line 553 of file CMIRIAMResource.cpp.

References mpPattern.

Referenced by CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

554 {*mpPattern = pattern;}
std::string * mpPattern
void CMIRIAMResource::setMIRIAMURI ( const std::string &  URI)

Set the URI of the MIRIAM Resource.

Parameters
conststd::string & URI

Definition at line 542 of file CMIRIAMResource.cpp.

References mpURI.

Referenced by CCopasiRootContainer::initializeChildren(), CMIRIAMResources::updateMIRIAMResources(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().

543 {*mpURI = URI;}
std::string * mpURI

Member Data Documentation

bool* CMIRIAMResource::mpCitation
private

A pointer to a bool indication the the resource an be used as reference

Definition at line 163 of file CMIRIAMResource.h.

Referenced by getMIRIAMCitation(), initializeParameter(), and setMIRIAMCitation().

CCopasiParameterGroup* CMIRIAMResource::mpDeprecated
private

A parameter group holding all deprecated URIs

Definition at line 168 of file CMIRIAMResource.h.

Referenced by addDeprecatedURL(), getMIRIAMDeprecated(), and initializeParameter().

std::string* CMIRIAMResource::mpDisplayName
private

The name used in the GUI

Definition at line 148 of file CMIRIAMResource.h.

Referenced by getMIRIAMDisplayName(), initializeParameter(), and setMIRIAMDisplayName().

std::string* CMIRIAMResource::mpPattern
private

A pointer to the pattern

Definition at line 158 of file CMIRIAMResource.h.

Referenced by getMIRIAMPattern(), initializeParameter(), and setMIRIAMPattern().

std::string* CMIRIAMResource::mpURI
private

A pointer to the URI

Definition at line 153 of file CMIRIAMResource.h.

Referenced by getIdentifiersOrgURL(), getMIRIAMURI(), initializeParameter(), and setMIRIAMURI().


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