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

#include <CLGlobalRenderInformation.h>

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

Public Member Functions

void addStyle (const CLGlobalStyle *pStyle)
 
 CLGlobalRenderInformation (CCopasiContainer *pParent=NULL)
 
 CLGlobalRenderInformation (const CLGlobalRenderInformation &source, CCopasiContainer *pParent=NULL)
 
 CLGlobalRenderInformation (const GlobalRenderInformation &source, CCopasiContainer *pParent=NULL)
 
CLGlobalStylecreateStyle ()
 
CCopasiVector< CLGlobalStyle > * getListOfStyles ()
 
const CCopasiVector
< CLGlobalStyle > * 
getListOfStyles () const
 
size_t getNumStyles () const
 
CLStylegetStyle (size_t i)
 
const CLStylegetStyle (size_t i) const
 
bool toSBML (GlobalRenderInformation *pGRI, 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< CLGlobalStylemListOfStyles
 
- 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 27 of file CLGlobalRenderInformation.h.

Constructor & Destructor Documentation

CLGlobalRenderInformation::CLGlobalRenderInformation ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 22 of file CLGlobalRenderInformation.cpp.

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

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

Copy Constructor.

Copy constructor

Definition at line 31 of file CLGlobalRenderInformation.cpp.

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

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

Constructor to generate object from the corresponding SBML object.

Definition at line 41 of file CLGlobalRenderInformation.cpp.

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

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

Member Function Documentation

void CLGlobalRenderInformation::addStyle ( const CLGlobalStyle pStyle)

Definition at line 109 of file CLGlobalRenderInformation.cpp.

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

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

Definition at line 102 of file CLGlobalRenderInformation.cpp.

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

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

Returns a pointer to the LitOfStyles object.

Definition at line 71 of file CLGlobalRenderInformation.cpp.

References mListOfStyles.

Referenced by CLRenderFlattener::flatten().

72 {
73  return &(this->mListOfStyles);
74 }
CCopasiVector< CLGlobalStyle > mListOfStyles
const CCopasiVector< CLGlobalStyle > * CLGlobalRenderInformation::getListOfStyles ( ) const

Returns a pointer to the LitOfStyles object.

Returns a pointer to the ListOfStyles object.

Definition at line 79 of file CLGlobalRenderInformation.cpp.

References mListOfStyles.

80 {
81  return &(this->mListOfStyles);
82 }
CCopasiVector< CLGlobalStyle > mListOfStyles
size_t CLGlobalRenderInformation::getNumStyles ( ) const

Returns the number of styles.

Definition at line 63 of file CLGlobalRenderInformation.cpp.

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

Referenced by CLRenderResolver::fill_global_maps(), and CCopasiXML::saveGlobalRenderInformation().

64 {
65  return this->mListOfStyles.size();
66 }
virtual size_t size() const
CCopasiVector< CLGlobalStyle > mListOfStyles
CLStyle * CLGlobalRenderInformation::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 88 of file CLGlobalRenderInformation.cpp.

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

Referenced by CLRenderResolver::fill_global_maps(), CLRenderFlattener::flatten(), CCopasiXML::saveGlobalRenderInformation(), and toSBML().

89 {
90  return (i < this->mListOfStyles.size()) ? this->mListOfStyles[i] : NULL;
91 }
virtual size_t size() const
CCopasiVector< CLGlobalStyle > mListOfStyles
const CLStyle * CLGlobalRenderInformation::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 97 of file CLGlobalRenderInformation.cpp.

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

98 {
99  return (i < this->mListOfStyles.size()) ? this->mListOfStyles[i] : NULL;
100 }
virtual size_t size() const
CCopasiVector< CLGlobalStyle > mListOfStyles
bool CLGlobalRenderInformation::toSBML ( GlobalRenderInformation *  pGRI,
unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 118 of file CLGlobalRenderInformation.cpp.

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

Referenced by CSBMLExporter::exportModelToString().

119 {
120  bool result = true;
121  this->addSBMLAttributes(pGRI);
122  size_t i, iMax = this->mListOfStyles.size();
123 
124  for (i = 0; i < iMax; ++i)
125  {
126  GlobalStyle* pStyle = static_cast<const CLGlobalStyle*>(this->getStyle(i))->toSBML(level, version);
127  int success = pGRI->addStyle(pStyle);
128  assert(success == LIBSBML_OPERATION_SUCCESS);
129  result = (result && (success == LIBSBML_OPERATION_SUCCESS));
130  delete pStyle;
131  }
132 
133  return result;
134 }
void addSBMLAttributes(RenderInformationBase *pBase) const
virtual size_t size() const
bool toSBML(GlobalRenderInformation *pGRI, unsigned int level, unsigned int version) const
CCopasiVector< CLGlobalStyle > mListOfStyles

Member Data Documentation

CCopasiVector<CLGlobalStyle> CLGlobalRenderInformation::mListOfStyles
protected

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