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

#include <CLRenderInformationBase.h>

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

Public Member Functions

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

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
 

Private Member Functions

CLRenderInformationBaseoperator= (const CLRenderInformationBase &source)
 

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 30 of file CLRenderInformationBase.h.

Constructor & Destructor Documentation

CLRenderInformationBase::CLRenderInformationBase ( const std::string &  name,
CCopasiContainer pParent = NULL 
)

Constructor.

Definition at line 27 of file CLRenderInformationBase.cpp.

27  :
28  CLBase(),
29  CCopasiContainer(name, pParent),
30  mKey(""),
31  mName("")
32 {
33 }
CLBase()
Definition: CLBase.h:36
CLRenderInformationBase::CLRenderInformationBase ( const CLRenderInformationBase source,
CCopasiContainer pParent 
)

Copy constructor.

Definition at line 38 of file CLRenderInformationBase.cpp.

38  :
39  CLBase(source),
40  CCopasiContainer(source, pParent),
46  mKey(""),
47  mName(source.mName)
48 {
49 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
CLBase()
Definition: CLBase.h:36
CCopasiVector< CLLineEnding > mListOfLineEndings
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
CLRenderInformationBase::CLRenderInformationBase ( const RenderInformationBase &  source,
const std::string &  name,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 54 of file CLRenderInformationBase.cpp.

References CCopasiVector< T >::add(), mListOfColorDefinitions, mListOfGradientDefinitions, and mListOfLineEndings.

61  :
62 
63  CLBase(),
64  CCopasiContainer(name, pParent),
65  mReferenceRenderInformation(source.getReferenceRenderInformationId()),
66  mBackgroundColor(source.getBackgroundColor()),
67  mKey(""),
68  mName(source.getName())
69 {
70  size_t i, iMax = source.getNumColorDefinitions();
71  const ColorDefinition* pCD = NULL;
72  CLColorDefinition* pLCD = NULL;
73 
74  for (i = 0; i < iMax; ++i)
75  {
76  pCD = source.getColorDefinition((unsigned int) i);
77  pLCD = new CLColorDefinition(*pCD);
78  this->mListOfColorDefinitions.add(pLCD, true);
79  //colorIdToKeyMap.insert(std::pair<std::string,std::string>(pCD->getId(),pLCD->getKey()));
80  }
81 
82  const GradientBase* pGD = NULL;
83 
84  CLGradientBase* pLGD = NULL;
85 
86  iMax = source.getNumGradientDefinitions();
87 
88  for (i = 0; i < iMax; ++i)
89  {
90  pGD = source.getGradientDefinition((unsigned int) i);
91 
92  if (dynamic_cast<const LinearGradient*>(pGD))
93  {
94  pLGD = new CLLinearGradient(*static_cast<const LinearGradient*>(pGD));
95  this->mListOfGradientDefinitions.add(pLGD, true);
96  }
97  else if (dynamic_cast<const RadialGradient*>(source.getGradientDefinition((unsigned int) i)))
98  {
99  pLGD = new CLRadialGradient(*static_cast<const RadialGradient*>(pGD));
100  this->mListOfGradientDefinitions.add(pLGD, true);
101  }
102 
103  //gradientIdToKeyMap.insert(std::pair<std::string,std::string>(pGD->getId(),pLGD->getKey()));
104  }
105 
106  const LineEnding* pLE = NULL;
107 
108  CLLineEnding* pLLE = NULL;
109 
110  iMax = source.getNumLineEndings();
111 
112  for (i = 0; i < iMax; ++i)
113  {
114  pLE = source.getLineEnding((unsigned int) i);
115  pLLE = new CLLineEnding(*pLE);
116  this->mListOfLineEndings.add(pLLE, true);
117  //lineEndingIdToKeyMap.insert(std::pair<std::string,std::string>(pLE->getId(),pLLE->getKey()));
118  }
119 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
CLBase()
Definition: CLBase.h:36
CCopasiVector< CLLineEnding > mListOfLineEndings
virtual bool add(const CType &src)
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
CLRenderInformationBase::~CLRenderInformationBase ( )

Destructor

Definition at line 124 of file CLRenderInformationBase.cpp.

References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().

125 {
127 }
bool remove(const std::string &key)
static CKeyFactory * getKeyFactory()

Member Function Documentation

void CLRenderInformationBase::addColorDefinition ( const CLColorDefinition pCD)

Adds a copy of the given color definition to the end of the list of color definitions.

Definition at line 212 of file CLRenderInformationBase.cpp.

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

Referenced by CLRenderFlattener::flatten(), and CCopasiXMLParser::ColorDefinitionElement::start().

213 {
214  this->mListOfColorDefinitions.add(new CLColorDefinition(*pCD), true);
215 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual bool add(const CType &src)
void CLRenderInformationBase::addGradientDefinition ( const CLGradientBase pGradient)

Adds a copy of the given gradient definition to the end of the list of gradient definitions.

Definition at line 294 of file CLRenderInformationBase.cpp.

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

Referenced by CCopasiXMLParser::LinearGradientElement::end(), CCopasiXMLParser::RadialGradientElement::end(), and CLRenderFlattener::flatten().

295 {
296  if (dynamic_cast<const CLLinearGradient*>(pGradient))
297  {
298  this->mListOfGradientDefinitions.add(new CLLinearGradient(*static_cast<const CLLinearGradient*>(pGradient)), true);
299  }
300  else if (dynamic_cast<const CLRadialGradient*>(pGradient))
301  {
302  this->mListOfGradientDefinitions.add(new CLRadialGradient(*static_cast<const CLRadialGradient*>(pGradient)), true);
303  }
304 }
virtual bool add(const CType &src)
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
void CLRenderInformationBase::addLineEnding ( const CLLineEnding pLE)

Adds a copy of the given line ending to the end of the list of line endings.

Definition at line 373 of file CLRenderInformationBase.cpp.

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

Referenced by CLRenderFlattener::flatten(), and CCopasiXMLParser::LineEndingElement::start().

374 {
375  this->mListOfLineEndings.add(new CLLineEnding(*pLE), true);
376 }
CCopasiVector< CLLineEnding > mListOfLineEndings
virtual bool add(const CType &src)
void CLRenderInformationBase::addSBMLAttributes ( RenderInformationBase *  pBase) const

Adds the attributes for a graphical primitive 1D object to the passed in. object.

Definition at line 400 of file CLRenderInformationBase.cpp.

References getBackgroundColor(), getColorDefinition(), getGradientDefinition(), getKey(), getLineEnding(), getReferenceRenderInformationKey(), mListOfColorDefinitions, mListOfGradientDefinitions, mListOfLineEndings, mName, CCopasiVector< T >::size(), CLLineEnding::toSBML(), and CLColorDefinition::toSBML().

Referenced by CLLocalRenderInformation::toSBML(), and CLGlobalRenderInformation::toSBML().

407 {
408  pBase->setReferenceRenderInformationId(this->getReferenceRenderInformationKey());
409  pBase->setBackgroundColor(this->getBackgroundColor());
410  pBase->setId(getKey());
411 
412  if (!mName.empty())
413  {
414  pBase->setName(mName);
415  }
416 
417  size_t i, iMax = this->mListOfColorDefinitions.size();
418  int result;
419 
420  unsigned int level = pBase->getLevel();
421  unsigned int version = pBase->getVersion();
422 
423  for (i = 0; i < iMax; ++i)
424  {
425  ColorDefinition* pCD = this->getColorDefinition(i)->toSBML(level, version);
426  result = pBase->addColorDefinition(pCD);
427  assert(result == LIBSBML_OPERATION_SUCCESS);
428  //colorKeyToIdMap.insert(std::pair<std::string,std::string>(this->getColorDefinition(i)->getKey(),pCD->getId()));
429  delete pCD;
430  }
431 
432  iMax = this->mListOfGradientDefinitions.size();
433  GradientBase* pGB = NULL;
434  const CLGradientBase* pLGB = NULL;
435 
436  for (i = 0; i < iMax; ++i)
437  {
438  pLGB = this->getGradientDefinition(i);
439 
440  if (dynamic_cast<const CLRadialGradient*>(pLGB))
441  {
442  pGB = static_cast<const CLRadialGradient*>(pLGB)->toSBML(level, version);
443  }
444  else
445  {
446  pGB = static_cast<const CLLinearGradient*>(pLGB)->toSBML(level, version);
447  }
448 
449  result = pBase->addGradientDefinition(pGB);
450  assert(result == LIBSBML_OPERATION_SUCCESS);
451  //gradientKeyToIdMap.insert(std::pair<std::string,std::string>(pLGB->getKey(),pGB->getId()));
452  delete pGB;
453  }
454 
455  iMax = this->mListOfLineEndings.size();
456 
457  for (i = 0; i < iMax; ++i)
458  {
459  const CLLineEnding* lineEnding = this->getLineEnding(i);
460  LineEnding* pLE = lineEnding->toSBML(level, version);
461  result = pBase->addLineEnding(pLE);
462  assert(result == LIBSBML_OPERATION_SUCCESS);
463  //lineEndingKeyToIdMap.insert(std::pair<std::string,std::string>(this->getLineEnding(i)->getKey(),pLE->getId()));
464  delete pLE;
465  }
466 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual size_t size() const
const std::string & getBackgroundColor() const
CCopasiVector< CLLineEnding > mListOfLineEndings
CLColorDefinition * getColorDefinition(size_t index)
const std::string & getReferenceRenderInformationKey() const
CLLineEnding * getLineEnding(size_t index)
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
LineEnding * toSBML(unsigned int level, unsigned int version) const
const std::string & getKey() const
CLGradientBase * getGradientDefinition(size_t index)
ColorDefinition * toSBML(unsigned int level, unsigned int version) const
CLColorDefinition * CLRenderInformationBase::createColorDefinition ( )

Creates a new color definition.

Definition at line 190 of file CLRenderInformationBase.cpp.

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

Referenced by test000097::addGlobalRenderInformation(), and test000097::addLocalRenderInformation().

191 {
193  this->mListOfColorDefinitions.add(pCD, true);
194  return pCD;
195 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual bool add(const CType &src)
CLLinearGradient * CLRenderInformationBase::createLinearGradientDefinition ( )

Creates a new linear gradient definition.

Definition at line 272 of file CLRenderInformationBase.cpp.

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

273 {
274  CLLinearGradient* pLG = new CLLinearGradient();
275  this->mListOfGradientDefinitions.add(pLG, true);
276  return pLG;
277 }
virtual bool add(const CType &src)
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
CLLineEnding * CLRenderInformationBase::createLineEnding ( )

Creates a new line ending.

Definition at line 351 of file CLRenderInformationBase.cpp.

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

352 {
353  CLLineEnding* pLE = new CLLineEnding();
354  this->mListOfLineEndings.add(pLE, true);
355  return pLE;
356 }
CCopasiVector< CLLineEnding > mListOfLineEndings
virtual bool add(const CType &src)
CLRadialGradient * CLRenderInformationBase::createRadialGradientDefinition ( )

Creates a new radial gradient definition.

Definition at line 262 of file CLRenderInformationBase.cpp.

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

263 {
264  CLRadialGradient* pRG = new CLRadialGradient();
265  this->mListOfGradientDefinitions.add(pRG, true);
266  return pRG;
267 }
virtual bool add(const CType &src)
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
const std::string & CLRenderInformationBase::getBackgroundColor ( ) const

Returns the background color which is either the id of a color in the list of color definitions, or a color value.

Definition at line 378 of file CLRenderInformationBase.cpp.

References mBackgroundColor.

Referenced by addSBMLAttributes(), CQLayoutScene::fillFromLayout(), CCopasiXML::saveRenderInformationAttributes(), and CLRenderResolver::setBackgroundColor().

379 {
380  return mBackgroundColor;
381 }
CLColorDefinition * CLRenderInformationBase::getColorDefinition ( size_t  index)

Returns a pointer to the color definition with the given index, or NULL if the index is invalid.

Definition at line 173 of file CLRenderInformationBase.cpp.

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

Referenced by addSBMLAttributes(), CLRenderResolver::fill_base_maps(), and CCopasiXML::saveRenderInformationDefinitionElements().

174 {
175  return (index < this->mListOfColorDefinitions.size()) ? this->mListOfColorDefinitions[index] : NULL;
176 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual size_t size() const
const CLColorDefinition * CLRenderInformationBase::getColorDefinition ( size_t  index) const

Returns a const pointer to the color definition with the given index, or NULL if the index is invalid.

Definition at line 182 of file CLRenderInformationBase.cpp.

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

183 {
184  return (index < this->mListOfColorDefinitions.size()) ? this->mListOfColorDefinitions[index] : NULL;
185 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual size_t size() const
CLGradientBase * CLRenderInformationBase::getGradientDefinition ( size_t  index)

Returns a pointer to the gradient definition with the given index, or NULL if the index is invalid.

Definition at line 245 of file CLRenderInformationBase.cpp.

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

Referenced by addSBMLAttributes(), CLRenderResolver::fill_base_maps(), and CCopasiXML::saveRenderInformationDefinitionElements().

246 {
247  return (index < this->mListOfGradientDefinitions.size()) ? this->mListOfGradientDefinitions[index] : NULL;
248 }
virtual size_t size() const
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
const CLGradientBase * CLRenderInformationBase::getGradientDefinition ( size_t  index) const

Returns a const pointer to the gradient definition with the given index, or NULL if the index is invalid.

Definition at line 254 of file CLRenderInformationBase.cpp.

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

255 {
256  return (index < this->mListOfGradientDefinitions.size()) ? this->mListOfGradientDefinitions[index] : NULL;
257 }
virtual size_t size() const
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
const std::string & CLRenderInformationBase::getKey ( ) const
virtual
CLLineEnding * CLRenderInformationBase::getLineEnding ( size_t  index)

Returns a pointer to the line ending with the given index, or NULL if the index is invalid.

Definition at line 334 of file CLRenderInformationBase.cpp.

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

Referenced by addSBMLAttributes(), CLRenderResolver::fill_base_maps(), CCopasiXML::saveRenderInformationDefinitionElements(), and CCopasiXMLParser::LineEndingElement::start().

335 {
336  return (index < this->mListOfLineEndings.size()) ? this->mListOfLineEndings[index] : NULL;
337 }
virtual size_t size() const
CCopasiVector< CLLineEnding > mListOfLineEndings
const CLLineEnding * CLRenderInformationBase::getLineEnding ( size_t  index) const

Returns a const pointer to the line ending with the given index, or NULL if the index is invalid.

Definition at line 343 of file CLRenderInformationBase.cpp.

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

344 {
345  return (index < this->mListOfLineEndings.size()) ? this->mListOfLineEndings[index] : NULL;
346 }
virtual size_t size() const
CCopasiVector< CLLineEnding > mListOfLineEndings
CCopasiVector< CLColorDefinition > * CLRenderInformationBase::getListOfColorDefinitions ( )

Returns a pointer to the list of color definitions.

Definition at line 156 of file CLRenderInformationBase.cpp.

References mListOfColorDefinitions.

157 {
158  return &(this->mListOfColorDefinitions);
159 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
const CCopasiVector< CLColorDefinition > * CLRenderInformationBase::getListOfColorDefinitions ( ) const

Returns a const pointer to the list of color definitions.

Definition at line 164 of file CLRenderInformationBase.cpp.

References mListOfColorDefinitions.

165 {
166  return &(this->mListOfColorDefinitions);
167 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
CCopasiVector< CLGradientBase > * CLRenderInformationBase::getListOfGradientDefinitions ( )

Returns a pointer to the list of gradient definitions.

Definition at line 228 of file CLRenderInformationBase.cpp.

References mListOfGradientDefinitions.

229 {
230  return &(this->mListOfGradientDefinitions);
231 }
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
const CCopasiVector< CLGradientBase > * CLRenderInformationBase::getListOfGradientDefinitions ( ) const

Returns a const pointer to the list of gradient definitions.

Definition at line 236 of file CLRenderInformationBase.cpp.

References mListOfGradientDefinitions.

237 {
238  return &(this->mListOfGradientDefinitions);
239 }
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
CCopasiVector< CLLineEnding > * CLRenderInformationBase::getListOfLineEndings ( )

Returns a pointer to the list of line endings.

Definition at line 317 of file CLRenderInformationBase.cpp.

References mListOfLineEndings.

318 {
319  return &(this->mListOfLineEndings);
320 }
CCopasiVector< CLLineEnding > mListOfLineEndings
const CCopasiVector< CLLineEnding > * CLRenderInformationBase::getListOfLineEndings ( ) const

Returns a const pointer to the list of line endings.

Definition at line 325 of file CLRenderInformationBase.cpp.

References mListOfLineEndings.

326 {
327  return &(this->mListOfLineEndings);
328 }
CCopasiVector< CLLineEnding > mListOfLineEndings
const std::string & CLRenderInformationBase::getName ( ) const
size_t CLRenderInformationBase::getNumColorDefinitions ( ) const

Returns the number of color definitions.

Definition at line 148 of file CLRenderInformationBase.cpp.

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

Referenced by CLRenderResolver::fill_base_maps(), and CCopasiXML::saveRenderInformationDefinitionElements().

149 {
150  return this->mListOfColorDefinitions.size();
151 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual size_t size() const
size_t CLRenderInformationBase::getNumGradientDefinitions ( ) const

Returns the number of gradient definitions.

Definition at line 220 of file CLRenderInformationBase.cpp.

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

Referenced by CLRenderResolver::fill_base_maps(), and CCopasiXML::saveRenderInformationDefinitionElements().

221 {
222  return this->mListOfGradientDefinitions.size();
223 }
virtual size_t size() const
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
size_t CLRenderInformationBase::getNumLineEndings ( ) const

Returns the number of line endings.

Definition at line 309 of file CLRenderInformationBase.cpp.

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

Referenced by CLRenderResolver::fill_base_maps(), CCopasiXML::saveRenderInformationDefinitionElements(), and CCopasiXMLParser::LineEndingElement::start().

310 {
311  return this->mListOfLineEndings.size();
312 }
virtual size_t size() const
CCopasiVector< CLLineEnding > mListOfLineEndings
const std::string & CLRenderInformationBase::getReferenceRenderInformationKey ( ) const

Returns the key of the referenced render information object..

Returns the id of the referenced render information object..

Definition at line 132 of file CLRenderInformationBase.cpp.

References mReferenceRenderInformation.

Referenced by addSBMLAttributes(), CLRenderFlattener::flatten(), and CCopasiXML::saveRenderInformationAttributes().

133 {
134  return this->mReferenceRenderInformation;
135 }
CLRenderInformationBase& CLRenderInformationBase::operator= ( const CLRenderInformationBase source)
private
void CLRenderInformationBase::removeColorDefinition ( size_t  index)

Removes the color definition with the given index.

Definition at line 200 of file CLRenderInformationBase.cpp.

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

201 {
202  if (index < this->mListOfColorDefinitions.size())
203  {
204  this->mListOfColorDefinitions.remove(index);
205  }
206 }
CCopasiVector< CLColorDefinition > mListOfColorDefinitions
virtual size_t size() const
virtual void remove(const size_t &index)
void CLRenderInformationBase::removeGradientDefinition ( size_t  index)

Removes the gradient definition with the given index.

Definition at line 282 of file CLRenderInformationBase.cpp.

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

283 {
284  if (index < this->mListOfGradientDefinitions.size())
285  {
286  this->mListOfGradientDefinitions.remove(index);
287  }
288 }
virtual size_t size() const
CCopasiVector< CLGradientBase > mListOfGradientDefinitions
virtual void remove(const size_t &index)
void CLRenderInformationBase::removeLineEnding ( size_t  index)

Removes the line ending with the given index.

Definition at line 361 of file CLRenderInformationBase.cpp.

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

362 {
363  if (index < this->mListOfLineEndings.size())
364  {
365  this->mListOfLineEndings.remove(index);
366  }
367 }
virtual size_t size() const
CCopasiVector< CLLineEnding > mListOfLineEndings
virtual void remove(const size_t &index)
void CLRenderInformationBase::setBackgroundColor ( const std::string &  bg)

Sets the background color to either the id of a color in the list of color definitions, or a color value.

Definition at line 383 of file CLRenderInformationBase.cpp.

References mBackgroundColor.

Referenced by CLRenderFlattener::flatten(), CCopasiXMLParser::LocalRenderInformationElement::start(), and CCopasiXMLParser::GlobalRenderInformationElement::start().

384 {
385  this->mBackgroundColor = bg;
386 }
void CLRenderInformationBase::setName ( const std::string &  name)

Sets the id of the object.

Sets the name of the object.

Definition at line 471 of file CLRenderInformationBase.cpp.

References mName.

Referenced by test000097::addGlobalRenderInformation(), and test000097::addLocalRenderInformation().

472 {
473  this->mName = name;
474 }
void CLRenderInformationBase::setReferenceRenderInformationKey ( const std::string &  key)

Sets the key of the referenced render information object.

Sets the id of the referenced render information object.

Definition at line 140 of file CLRenderInformationBase.cpp.

References mReferenceRenderInformation.

141 {
142  this->mReferenceRenderInformation = key;
143 }

Member Data Documentation

std::string CLRenderInformationBase::mBackgroundColor
protected

Definition at line 39 of file CLRenderInformationBase.h.

Referenced by getBackgroundColor(), and setBackgroundColor().

std::string CLRenderInformationBase::mKey
protected
CCopasiVector<CLColorDefinition> CLRenderInformationBase::mListOfColorDefinitions
protected
CCopasiVector<CLGradientBase> CLRenderInformationBase::mListOfGradientDefinitions
protected
CCopasiVector<CLLineEnding> CLRenderInformationBase::mListOfLineEndings
protected
std::string CLRenderInformationBase::mName
protected

The name of the render information, which is more informative than the key.

Definition at line 53 of file CLRenderInformationBase.h.

Referenced by addSBMLAttributes(), getName(), and setName().

std::string CLRenderInformationBase::mReferenceRenderInformation
protected

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