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

#include <CLGradientStop.h>

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

Public Member Functions

 CLGradientStop (CCopasiContainer *pParent=NULL)
 
 CLGradientStop (const CLGradientStop &source, CCopasiContainer *pParent=NULL)
 
 CLGradientStop (const GradientStop &source, CCopasiContainer *pParent=NULL)
 
const std::string & getKey () const
 
const CLRelAbsVectorgetOffset () const
 
const std::string & getStopColor () const
 
void setOffset (double x, double y)
 
void setOffset (const std::string &)
 
void setOffset (const CLRelAbsVector &co)
 
void setStopColor (const std::string &key)
 
GradientStop * toSBML (unsigned int level, unsigned int version) const
 
virtual ~CLGradientStop ()
 
- 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 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
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) 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
 
virtual std::string getUnits () const
 
UpdateMethodgetUpdateMethod () const
 
virtual const CCopasiObjectgetValueObject () 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 mKey
 
CLRelAbsVector mOffset
 
std::string mStopColor
 
- Protected Attributes inherited from CLBase
std::string mTag
 

Private Member Functions

CLGradientStopoperator= (const CLGradientStop &source)
 

Additional Inherited Members

- 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)
 
- 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 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 26 of file CLGradientStop.h.

Constructor & Destructor Documentation

CLGradientStop::CLGradientStop ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 28 of file CLGradientStop.cpp.

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

28  :
29  CLBase(),
30  CCopasiObject("GradientStop", pParent),
31  mOffset(CLRelAbsVector(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())),
32  mStopColor("#00000000"),
33  mKey("")
34 {
35  this->mKey = CCopasiRootContainer::getKeyFactory()->add("GradientStop", this);
36 }
CLBase()
Definition: CLBase.h:36
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mOffset
std::string mKey
static CKeyFactory * getKeyFactory()
std::string mStopColor
CLGradientStop::CLGradientStop ( const CLGradientStop source,
CCopasiContainer pParent = NULL 
)

Copy Constructor

Definition at line 41 of file CLGradientStop.cpp.

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

41  :
42  CLBase(source),
43  CCopasiObject(source, pParent),
44  mOffset(source.mOffset),
45  mStopColor(source.mStopColor),
46  mKey("")
47 {
48  this->mKey = CCopasiRootContainer::getKeyFactory()->add("GradientStop", this);
49 }
CLBase()
Definition: CLBase.h:36
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mOffset
std::string mKey
static CKeyFactory * getKeyFactory()
std::string mStopColor
CLGradientStop::CLGradientStop ( const GradientStop &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Copy Constructor

Definition at line 54 of file CLGradientStop.cpp.

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

54  :
55  CLBase(),
56  CCopasiObject("GradientStop", pParent),
57  mOffset(source.getOffset()),
58  mStopColor(source.getStopColor()),
59  mKey("")
60 {
61  this->mKey = CCopasiRootContainer::getKeyFactory()->add("GradientStop", this);
62 }
CLBase()
Definition: CLBase.h:36
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mOffset
std::string mKey
static CKeyFactory * getKeyFactory()
std::string mStopColor
CLGradientStop::~CLGradientStop ( )
virtual

Virtual destructor to satify the linker.

Virtual destructor to satify the linker. Does nothing , is only in the source file to help the compiler in determining where to put the vtable.

Definition at line 69 of file CLGradientStop.cpp.

70 {
71 }

Member Function Documentation

const std::string & CLGradientStop::getKey ( ) const
virtual

Returns the key of the color definition.

Reimplemented from CCopasiObject.

Definition at line 137 of file CLGradientStop.cpp.

References mKey.

138 {
139  return this->mKey;
140 }
std::string mKey
const CLRelAbsVector & CLGradientStop::getOffset ( ) const

Returns the offset.

Definition at line 76 of file CLGradientStop.cpp.

References mOffset.

Referenced by CLGradientStops::CLGradientStops(), getLinearGradient(), getRadialGradient(), and CCopasiXML::saveGradientStop().

77 {
78  return this->mOffset;
79 }
CLRelAbsVector mOffset
const std::string & CLGradientStop::getStopColor ( ) const

Returns the stop color id.

Definition at line 108 of file CLGradientStop.cpp.

References mStopColor.

Referenced by CLGradientStops::CLGradientStops(), getLinearGradient(), getRadialGradient(), CCopasiXML::saveGradientStop(), and CLLayoutRenderer::update_colors().

109 {
110  return this->mStopColor;
111 }
std::string mStopColor
CLGradientStop& CLGradientStop::operator= ( const CLGradientStop source)
private
void CLGradientStop::setOffset ( double  x,
double  y 
)

Sets the offset.

Definition at line 84 of file CLGradientStop.cpp.

References mOffset.

Referenced by CCopasiXMLParser::GradientStopElement::start().

85 {
86  this->mOffset = CLRelAbsVector(x, y);
87 }
CLRelAbsVector mOffset
void CLGradientStop::setOffset ( const std::string &  co)

Sets the offset.

Definition at line 92 of file CLGradientStop.cpp.

References mOffset.

93 {
94  this->mOffset = CLRelAbsVector(co);
95 }
CLRelAbsVector mOffset
void CLGradientStop::setOffset ( const CLRelAbsVector co)

Sets the offset.

Definition at line 100 of file CLGradientStop.cpp.

References mOffset.

101 {
102  this->mOffset = co;
103 }
CLRelAbsVector mOffset
void CLGradientStop::setStopColor ( const std::string &  key)

Sets the stop color id.

Sets the stop color key.

Definition at line 116 of file CLGradientStop.cpp.

References mStopColor.

Referenced by CCopasiXMLParser::GradientStopElement::start().

117 {
118  this->mStopColor = key;
119 }
std::string mStopColor
GradientStop * CLGradientStop::toSBML ( unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 124 of file CLGradientStop.cpp.

References mOffset, mStopColor, and CLRelAbsVector::toSBML().

125 {
126  GradientStop* pStop = new GradientStop(level, version);
127  RelAbsVector* pV = this->mOffset.toSBML();
128  pStop->setOffset(*pV);
129  delete pV;
130  pStop->setStopColor(this->mStopColor);
131  return pStop;
132 }
RelAbsVector * toSBML() const
CLRelAbsVector mOffset
std::string mStopColor

Member Data Documentation

std::string CLGradientStop::mKey
protected

key string for the gradient stop.

Definition at line 39 of file CLGradientStop.h.

Referenced by CLGradientStop(), and getKey().

CLRelAbsVector CLGradientStop::mOffset
protected

Definition at line 33 of file CLGradientStop.h.

Referenced by getOffset(), setOffset(), and toSBML().

std::string CLGradientStop::mStopColor
protected

Definition at line 34 of file CLGradientStop.h.

Referenced by getStopColor(), setStopColor(), and toSBML().


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