COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
CLLocalRenderInformation Class Reference

#include <CLLocalRenderInformation.h>

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

Public Member Functions

void addStyle (const CLLocalStyle *pStyle)
 
 CLLocalRenderInformation (CCopasiContainer *pParent=NULL)
 
 CLLocalRenderInformation (const CLLocalRenderInformation &source, CCopasiContainer *pParent=NULL)
 
 CLLocalRenderInformation (const LocalRenderInformation &source, CCopasiContainer *pParent=NULL)
 
CLLocalStylecreateStyle ()
 
CCopasiVector< CLLocalStyle > * getListOfStyles ()
 
const CCopasiVector
< CLLocalStyle > * 
getListOfStyles () const
 
size_t getNumStyles () const
 
CLLocalStylegetStyle (size_t i)
 
const CLLocalStylegetStyle (size_t i) const
 
LocalRenderInformation * toSBML (unsigned int level, unsigned int version) const
 
- Public Member Functions inherited from CLRenderInformationBase
void addColorDefinition (const CLColorDefinition *cd)
 
void addGradientDefinition (const CLGradientBase *gradient)
 
void addLineEnding (const CLLineEnding *le)
 
void addSBMLAttributes (RenderInformationBase *pBase) const
 
 CLRenderInformationBase (const std::string &name, CCopasiContainer *pParent=NULL)
 
 CLRenderInformationBase (const CLRenderInformationBase &source, CCopasiContainer *pParent)
 
 CLRenderInformationBase (const RenderInformationBase &source, const std::string &name, CCopasiContainer *pParent=NULL)
 
CLColorDefinitioncreateColorDefinition ()
 
CLLinearGradientcreateLinearGradientDefinition ()
 
CLLineEndingcreateLineEnding ()
 
CLRadialGradientcreateRadialGradientDefinition ()
 
const std::string & getBackgroundColor () const
 
CLColorDefinitiongetColorDefinition (size_t index)
 
const CLColorDefinitiongetColorDefinition (size_t index) const
 
CLGradientBasegetGradientDefinition (size_t index)
 
const CLGradientBasegetGradientDefinition (size_t index) const
 
const std::string & getKey () const
 
CLLineEndinggetLineEnding (size_t index)
 
const CLLineEndinggetLineEnding (size_t index) const
 
CCopasiVector
< CLColorDefinition > * 
getListOfColorDefinitions ()
 
const CCopasiVector
< CLColorDefinition > * 
getListOfColorDefinitions () const
 
CCopasiVector< CLGradientBase > * getListOfGradientDefinitions ()
 
const CCopasiVector
< CLGradientBase > * 
getListOfGradientDefinitions () const
 
CCopasiVector< CLLineEnding > * getListOfLineEndings ()
 
const CCopasiVector
< CLLineEnding > * 
getListOfLineEndings () const
 
const std::string & getName () const
 
size_t getNumColorDefinitions () const
 
size_t getNumGradientDefinitions () const
 
size_t getNumLineEndings () const
 
const std::string & getReferenceRenderInformationKey () const
 
void removeColorDefinition (size_t index)
 
void removeGradientDefinition (size_t index)
 
void removeLineEnding (size_t index)
 
void setBackgroundColor (const std::string &bg)
 
void setName (const std::string &name)
 
void setReferenceRenderInformationKey (const std::string &key)
 
 ~CLRenderInformationBase ()
 
- Public Member Functions inherited from CLBase
 CLBase ()
 
 CLBase (const CLBase &b)
 
 CLBase (const SBase &)
 
const std::string & getTag () const
 
bool hasTag () const
 
virtual void moveBy (const CLPoint &)
 
void setTag (const std::string &tag)
 
virtual ~CLBase ()
 
- 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 CObjectInterfacegetObject (const CCopasiObjectName &cn) 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 CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) 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 ()
 

Protected Attributes

CCopasiVector< CLLocalStylemListOfStyles
 
- Protected Attributes inherited from CLRenderInformationBase
std::string mBackgroundColor
 
std::string mKey
 
CCopasiVector< CLColorDefinitionmListOfColorDefinitions
 
CCopasiVector< CLGradientBasemListOfGradientDefinitions
 
CCopasiVector< CLLineEndingmListOfLineEndings
 
std::string mName
 
std::string mReferenceRenderInformation
 
- Protected Attributes inherited from CLBase
std::string mTag
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 

Additional Inherited Members

- 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 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)
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 23 of file CLLocalRenderInformation.h.

Constructor & Destructor Documentation

CLLocalRenderInformation::CLLocalRenderInformation ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 21 of file CLLocalRenderInformation.cpp.

References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and CLRenderInformationBase::mKey.

21  :
22  CLRenderInformationBase("LocalRenderInformation", pParent)
23 {
24  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalRenderInformation", this);
25 }
CLRenderInformationBase(const std::string &name, CCopasiContainer *pParent=NULL)
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CLLocalRenderInformation::CLLocalRenderInformation ( const CLLocalRenderInformation source,
CCopasiContainer pParent = NULL 
)

Copy Constructor.

Copy constructor

Definition at line 30 of file CLLocalRenderInformation.cpp.

References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and CLRenderInformationBase::mKey.

30  :
31  CLRenderInformationBase(source, pParent),
32  mListOfStyles(source.mListOfStyles, this)
33 {
34  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalRenderInformation", this);
35 }
CCopasiVector< CLLocalStyle > mListOfStyles
CLRenderInformationBase(const std::string &name, CCopasiContainer *pParent=NULL)
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CLLocalRenderInformation::CLLocalRenderInformation ( const LocalRenderInformation &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 40 of file CLLocalRenderInformation.cpp.

References CKeyFactory::add(), CCopasiVector< T >::add(), CCopasiRootContainer::getKeyFactory(), CLRenderInformationBase::mKey, and mListOfStyles.

46  :
47  //CLRenderInformationBase(source,"LocalRenderInformation",colorIdToKeyMap,gradientIdToKeyMap,lineEndingIdToKeyMap,pParent)
48  CLRenderInformationBase(source, "LocalRenderInformation", pParent)
49 {
50  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalRenderInformation", this);
51  size_t i, iMax = source.getNumStyles();
52 
53  for (i = 0; i < iMax; ++i)
54  {
55  this->mListOfStyles.add(new CLLocalStyle(*source.getStyle((unsigned int) i)), true);
56  }
57 }
CCopasiVector< CLLocalStyle > mListOfStyles
CLRenderInformationBase(const std::string &name, CCopasiContainer *pParent=NULL)
virtual bool add(const CType &src)
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()

Member Function Documentation

void CLLocalRenderInformation::addStyle ( const CLLocalStyle pStyle)

Definition at line 108 of file CLLocalRenderInformation.cpp.

References CCopasiVector< T >::add(), and mListOfStyles.

109 {
110  this->mListOfStyles.add(new CLLocalStyle(*pStyle), true);
111 }
CCopasiVector< CLLocalStyle > mListOfStyles
virtual bool add(const CType &src)
CLLocalStyle * CLLocalRenderInformation::createStyle ( )

Definition at line 101 of file CLLocalRenderInformation.cpp.

References CCopasiVector< T >::add(), and mListOfStyles.

102 {
103  CLLocalStyle* pStyle = new CLLocalStyle();
104  this->mListOfStyles.add(pStyle, true);
105  return pStyle;
106 }
CCopasiVector< CLLocalStyle > mListOfStyles
virtual bool add(const CType &src)
CCopasiVector< CLLocalStyle > * CLLocalRenderInformation::getListOfStyles ( )

Returns a pointer to the LitOfStyles object.

Definition at line 70 of file CLLocalRenderInformation.cpp.

References mListOfStyles.

Referenced by CLRenderFlattener::flatten().

71 {
72  return &(this->mListOfStyles);
73 }
CCopasiVector< CLLocalStyle > mListOfStyles
const CCopasiVector< CLLocalStyle > * CLLocalRenderInformation::getListOfStyles ( ) const

Returns a pointer to the LitOfStyles object.

Definition at line 78 of file CLLocalRenderInformation.cpp.

References mListOfStyles.

79 {
80  return &(this->mListOfStyles);
81 }
CCopasiVector< CLLocalStyle > mListOfStyles
size_t CLLocalRenderInformation::getNumStyles ( ) const

Returns the number of styles.

Definition at line 62 of file CLLocalRenderInformation.cpp.

References mListOfStyles, and CCopasiVector< T >::size().

Referenced by SBMLDocumentLoader::createLayout(), CLRenderResolver::fill_local_maps(), and CCopasiXML::saveLocalRenderInformation().

63 {
64  return this->mListOfStyles.size();
65 }
virtual size_t size() const
CCopasiVector< CLLocalStyle > mListOfStyles
CLLocalStyle * CLLocalRenderInformation::getStyle ( size_t  i)

Returns a pointer to the style with the given index. If the index is invalid, NULL is returned.

Definition at line 87 of file CLLocalRenderInformation.cpp.

References mListOfStyles, and CCopasiVector< T >::size().

Referenced by SBMLDocumentLoader::createLayout(), CLRenderResolver::fill_local_maps(), CLRenderFlattener::flatten(), CCopasiXML::saveLocalRenderInformation(), and toSBML().

88 {
89  return (i < this->mListOfStyles.size()) ? this->mListOfStyles[i] : NULL;
90 }
virtual size_t size() const
CCopasiVector< CLLocalStyle > mListOfStyles
const CLLocalStyle * CLLocalRenderInformation::getStyle ( size_t  i) const

Returns a pointer to the style with the given index. If the index is invalid, NULL is returned.

Definition at line 96 of file CLLocalRenderInformation.cpp.

References mListOfStyles, and CCopasiVector< T >::size().

97 {
98  return (i < this->mListOfStyles.size()) ? this->mListOfStyles[i] : NULL;
99 }
virtual size_t size() const
CCopasiVector< CLLocalStyle > mListOfStyles
LocalRenderInformation * CLLocalRenderInformation::toSBML ( unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 116 of file CLLocalRenderInformation.cpp.

References CLRenderInformationBase::addSBMLAttributes(), getStyle(), mListOfStyles, CCopasiVector< T >::size(), and CLLocalStyle::toSBML().

117 {
118  LocalRenderInformation* pLRI = new LocalRenderInformation(level, version);
119  //this->addSBMLAttributes(pLRI,colorKeyToIdMap,gradientKeyToIdMap,lineEndingKeyToIdMap);
120  this->addSBMLAttributes(pLRI);
121  size_t i, iMax = this->mListOfStyles.size();
122 
123  for (i = 0; i < iMax; ++i)
124  {
125  LocalStyle* pStyle = this->getStyle(i)->toSBML(level, version);
126  int result = pLRI->addStyle(pStyle);
127  assert(result == LIBSBML_OPERATION_SUCCESS);
128  delete pStyle;
129  }
130 
131  return pLRI;
132 }
void addSBMLAttributes(RenderInformationBase *pBase) const
LocalStyle * toSBML(unsigned int level, unsigned int version) const
virtual size_t size() const
CCopasiVector< CLLocalStyle > mListOfStyles
CLLocalStyle * getStyle(size_t i)

Member Data Documentation

CCopasiVector<CLLocalStyle> CLLocalRenderInformation::mListOfStyles
protected

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