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

#include <CLLinearGradient.h>

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

Public Member Functions

 CLLinearGradient (CCopasiContainer *pParent=NULL)
 
 CLLinearGradient (const CLLinearGradient &source, CCopasiContainer *pParent=NULL)
 
 CLLinearGradient (const LinearGradient &source, CCopasiContainer *pParent=NULL)
 
const CLRelAbsVectorgetXPoint1 () const
 
CLRelAbsVectorgetXPoint1 ()
 
const CLRelAbsVectorgetXPoint2 () const
 
CLRelAbsVectorgetXPoint2 ()
 
const CLRelAbsVectorgetYPoint1 () const
 
CLRelAbsVectorgetYPoint1 ()
 
const CLRelAbsVectorgetYPoint2 () const
 
CLRelAbsVectorgetYPoint2 ()
 
const CLRelAbsVectorgetZPoint1 () const
 
CLRelAbsVectorgetZPoint1 ()
 
const CLRelAbsVectorgetZPoint2 () const
 
CLRelAbsVectorgetZPoint2 ()
 
void setCoordinates (const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1, const CLRelAbsVector &x2, const CLRelAbsVector &y2, const CLRelAbsVector &z2)
 
void setCoordinates (const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &x2, const CLRelAbsVector &y2)
 
void setPoint1 (const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1=CLRelAbsVector(0.0, 0.0))
 
void setPoint2 (const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1=CLRelAbsVector(0.0, 0.0))
 
virtual LinearGradient * toSBML (unsigned int level, unsigned int version) const
 
- Public Member Functions inherited from CLGradientBase
void addGradientStop (const CLGradientStop *pStop)
 
virtual void addSBMLAttributes (GradientBase *pBase) const
 
 CLGradientBase (const std::string &name, CCopasiContainer *pParent=NULL)
 
 CLGradientBase (const CLGradientBase &source, CCopasiContainer *pParent=NULL)
 
 CLGradientBase (const GradientBase &source, const std::string &name, CCopasiContainer *pParent=NULL)
 
CLGradientStopcreateGradientStop ()
 
CLGradientStopgetGradientStop (size_t i)
 
const CLGradientStopgetGradientStop (size_t i) const
 
const std::string & getId () const
 
const std::string & getKey () const
 
CCopasiVector< CLGradientStop > * getListOfGradientStops ()
 
const CCopasiVector
< CLGradientStop > * 
getListOfGradientStops () const
 
size_t getNumGradientStops () const
 
SPREADMETHOD getSpreadMethod () const
 
void setId (const std::string &id)
 
void setSpreadMethod (SPREADMETHOD method)
 
virtual ~CLGradientBase ()
 
- 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

CLRelAbsVector mX1
 
CLRelAbsVector mX2
 
CLRelAbsVector mY1
 
CLRelAbsVector mY2
 
CLRelAbsVector mZ1
 
CLRelAbsVector mZ2
 
- Protected Attributes inherited from CLGradientBase
CCopasiVector< CLGradientStopmGradientStops
 
std::string mId
 
std::string mKey
 
SPREADMETHOD mSpreadMethod
 
- Protected Attributes inherited from CLBase
std::string mTag
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 

Private Member Functions

CLLinearGradientoperator= (const CLLinearGradient &source)
 

Additional Inherited Members

- Public Types inherited from CLGradientBase
enum  SPREADMETHOD { PAD, REFLECT, REPEAT }
 
- 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 25 of file CLLinearGradient.h.

Constructor & Destructor Documentation

CLLinearGradient::CLLinearGradient ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 25 of file CLLinearGradient.cpp.

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

26  : CLGradientBase("LinearGradient", pParent),
27  mX1(CLRelAbsVector(0.0, 0.0)),
28  mY1(CLRelAbsVector(0.0, 0.0)),
29  mZ1(CLRelAbsVector(0.0, 0.0)),
30  mX2(CLRelAbsVector(0.0, 100.0)),
31  mY2(CLRelAbsVector(0.0, 100.0)),
32  mZ2(CLRelAbsVector(0.0, 100.0))
33 {
34  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LinearGradient", this);
35 }
CLRelAbsVector mZ1
CLRelAbsVector mY1
CLRelAbsVector mX2
CLGradientBase(const std::string &name, CCopasiContainer *pParent=NULL)
CLRelAbsVector mY2
std::string mKey
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ2
CLRelAbsVector mX1
static CKeyFactory * getKeyFactory()
CLLinearGradient::CLLinearGradient ( const CLLinearGradient source,
CCopasiContainer pParent = NULL 
)

Copy Constructor

Definition at line 40 of file CLLinearGradient.cpp.

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

40  :
41  CLGradientBase(source, pParent),
42  mX1(source.mX1),
43  mY1(source.mY1),
44  mZ1(source.mZ1),
45  mX2(source.mX2),
46  mY2(source.mY2),
47  mZ2(source.mZ2)
48 {
49  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LinearGradient", this);
50 }
CLRelAbsVector mZ1
CLRelAbsVector mY1
CLRelAbsVector mX2
CLGradientBase(const std::string &name, CCopasiContainer *pParent=NULL)
CLRelAbsVector mY2
std::string mKey
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ2
CLRelAbsVector mX1
static CKeyFactory * getKeyFactory()
CLLinearGradient::CLLinearGradient ( const LinearGradient &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 55 of file CLLinearGradient.cpp.

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

55  :
56  CLGradientBase(source, "LinearGradient", pParent),
57  mX1(source.getXPoint1()),
58  mY1(source.getYPoint1()),
59  mZ1(source.getZPoint1()),
60  mX2(source.getXPoint2()),
61  mY2(source.getYPoint2()),
62  mZ2(source.getZPoint2())
63 {
64  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LinearGradient", this);
65 }
CLRelAbsVector mZ1
CLRelAbsVector mY1
CLRelAbsVector mX2
CLGradientBase(const std::string &name, CCopasiContainer *pParent=NULL)
CLRelAbsVector mY2
std::string mKey
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ2
CLRelAbsVector mX1
static CKeyFactory * getKeyFactory()

Member Function Documentation

const CLRelAbsVector & CLLinearGradient::getXPoint1 ( ) const

Returns the x coordinate for the first point.

Definition at line 107 of file CLLinearGradient.cpp.

References mX1.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), getLinearGradient(), CCopasiXML::saveLinearGradient(), and toSBML().

108 {
109  return this->mX1;
110 }
CLRelAbsVector mX1
CLRelAbsVector & CLLinearGradient::getXPoint1 ( )

Returns the x coordinate for the first point.

Definition at line 155 of file CLLinearGradient.cpp.

References mX1.

156 {
157  return this->mX1;
158 }
CLRelAbsVector mX1
const CLRelAbsVector & CLLinearGradient::getXPoint2 ( ) const

Returns the x coordinate for the second point.

Definition at line 131 of file CLLinearGradient.cpp.

References mX2.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), getLinearGradient(), CCopasiXML::saveLinearGradient(), and toSBML().

132 {
133  return this->mX2;
134 }
CLRelAbsVector mX2
CLRelAbsVector & CLLinearGradient::getXPoint2 ( )

Returns the x coordinate for the second point.

Definition at line 179 of file CLLinearGradient.cpp.

References mX2.

180 {
181  return this->mX2;
182 }
CLRelAbsVector mX2
const CLRelAbsVector & CLLinearGradient::getYPoint1 ( ) const

Returns the y coordinate for the first point.

Returns the x coordinate for the first point.

Definition at line 115 of file CLLinearGradient.cpp.

References mY1.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), getLinearGradient(), CCopasiXML::saveLinearGradient(), and toSBML().

116 {
117  return this->mY1;
118 }
CLRelAbsVector mY1
CLRelAbsVector & CLLinearGradient::getYPoint1 ( )

Returns the y coordinate for the first point.

Returns the x coordinate for the first point.

Definition at line 163 of file CLLinearGradient.cpp.

References mY1.

164 {
165  return this->mY1;
166 }
CLRelAbsVector mY1
const CLRelAbsVector & CLLinearGradient::getYPoint2 ( ) const

Returns the y coordinate for the second point.

Returns the x coordinate for the second point.

Definition at line 139 of file CLLinearGradient.cpp.

References mY2.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), getLinearGradient(), CCopasiXML::saveLinearGradient(), and toSBML().

140 {
141  return this->mY2;
142 }
CLRelAbsVector mY2
CLRelAbsVector & CLLinearGradient::getYPoint2 ( )

Returns the y coordinate for the second point.

Returns the x coordinate for the second point.

Definition at line 187 of file CLLinearGradient.cpp.

References mY2.

188 {
189  return this->mY2;
190 }
CLRelAbsVector mY2
const CLRelAbsVector & CLLinearGradient::getZPoint1 ( ) const

Returns the z coordinate for the first point.

Returns the x coordinate for the first point.

Definition at line 123 of file CLLinearGradient.cpp.

References mZ1.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), CCopasiXML::saveLinearGradient(), and toSBML().

124 {
125  return this->mZ1;
126 }
CLRelAbsVector mZ1
CLRelAbsVector & CLLinearGradient::getZPoint1 ( )

Returns the z coordinate for the first point.

Returns the x coordinate for the first point.

Definition at line 171 of file CLLinearGradient.cpp.

References mZ1.

172 {
173  return this->mZ1;
174 }
CLRelAbsVector mZ1
const CLRelAbsVector & CLLinearGradient::getZPoint2 ( ) const

Returns the z coordinate for the second point.

Returns the x coordinate for the second point.

Definition at line 147 of file CLLinearGradient.cpp.

References mZ2.

Referenced by CLLayoutRenderer::create_linear_gradient_texture(), CCopasiXML::saveLinearGradient(), and toSBML().

148 {
149  return this->mZ2;
150 }
CLRelAbsVector mZ2
CLRelAbsVector & CLLinearGradient::getZPoint2 ( )

Returns the z coordinate for the second point.

Returns the x coordinate for the second point.

Definition at line 195 of file CLLinearGradient.cpp.

References mZ2.

196 {
197  return this->mZ2;
198 }
CLRelAbsVector mZ2
CLLinearGradient& CLLinearGradient::operator= ( const CLLinearGradient source)
private
void CLLinearGradient::setCoordinates ( const CLRelAbsVector x1,
const CLRelAbsVector y1,
const CLRelAbsVector z1,
const CLRelAbsVector x2,
const CLRelAbsVector y2,
const CLRelAbsVector z2 
)

Sets the 3D coordinates for both points.

Definition at line 70 of file CLLinearGradient.cpp.

References setPoint1(), and setPoint2().

Referenced by setCoordinates().

71 {
72  this->setPoint1(x1, y1, z1);
73  this->setPoint2(x2, y2, z2);
74 }
void setPoint1(const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1=CLRelAbsVector(0.0, 0.0))
void setPoint2(const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1=CLRelAbsVector(0.0, 0.0))
void CLLinearGradient::setCoordinates ( const CLRelAbsVector x1,
const CLRelAbsVector y1,
const CLRelAbsVector x2,
const CLRelAbsVector y2 
)

Sets the 3D coordinates for both points.

Definition at line 79 of file CLLinearGradient.cpp.

References setCoordinates().

80 {
81  this->setCoordinates(x1, y1, CLRelAbsVector(0.0, 0.0), x2, y2, CLRelAbsVector(0.0, 100.0));
82 }
void setCoordinates(const CLRelAbsVector &x1, const CLRelAbsVector &y1, const CLRelAbsVector &z1, const CLRelAbsVector &x2, const CLRelAbsVector &y2, const CLRelAbsVector &z2)
void CLLinearGradient::setPoint1 ( const CLRelAbsVector x,
const CLRelAbsVector y,
const CLRelAbsVector z = CLRelAbsVector(0.0, 0.0) 
)

Sets the coordinates for the first point.

Definition at line 87 of file CLLinearGradient.cpp.

References mX1, mY1, and mZ1.

Referenced by setCoordinates(), and CCopasiXMLParser::LinearGradientElement::start().

88 {
89  this->mX1 = x;
90  this->mY1 = y;
91  this->mZ1 = z;
92 }
CLRelAbsVector mZ1
CLRelAbsVector mY1
CLRelAbsVector mX1
void CLLinearGradient::setPoint2 ( const CLRelAbsVector x,
const CLRelAbsVector y,
const CLRelAbsVector z = CLRelAbsVector(0.0, 0.0) 
)

Sets the coordinates for the second point.

Definition at line 97 of file CLLinearGradient.cpp.

References mX2, mY2, and mZ2.

Referenced by setCoordinates(), and CCopasiXMLParser::LinearGradientElement::start().

98 {
99  this->mX2 = x;
100  this->mY2 = y;
101  this->mZ2 = z;
102 }
CLRelAbsVector mX2
CLRelAbsVector mY2
CLRelAbsVector mZ2
LinearGradient * CLLinearGradient::toSBML ( unsigned int  level,
unsigned int  version 
) const
virtual

Converts this object to the corresponding SBML object.

Definition at line 203 of file CLLinearGradient.cpp.

References CLGradientBase::addSBMLAttributes(), getXPoint1(), getXPoint2(), getYPoint1(), getYPoint2(), getZPoint1(), getZPoint2(), and CLRelAbsVector::toSBML().

204 {
205  LinearGradient* pLG = new LinearGradient(level, version);
206  this->addSBMLAttributes(pLG);
207  RelAbsVector* pV1 = this->getXPoint1().toSBML();
208  RelAbsVector* pV2 = this->getYPoint1().toSBML();
209  RelAbsVector* pV3 = this->getZPoint1().toSBML();
210  pLG->setPoint1(*pV1, *pV2, *pV3);
211  delete pV1;
212  delete pV2;
213  delete pV3;
214  pV1 = this->getXPoint2().toSBML();
215  pV2 = this->getYPoint2().toSBML();
216  pV3 = this->getZPoint2().toSBML();
217  pLG->setPoint2(*pV1, *pV2, *pV3);
218  delete pV1;
219  delete pV2;
220  delete pV3;
221  return pLG;
222 }
const CLRelAbsVector & getYPoint1() const
const CLRelAbsVector & getZPoint1() const
const CLRelAbsVector & getXPoint2() const
virtual void addSBMLAttributes(GradientBase *pBase) const
RelAbsVector * toSBML() const
const CLRelAbsVector & getZPoint2() const
const CLRelAbsVector & getYPoint2() const
const CLRelAbsVector & getXPoint1() const

Member Data Documentation

CLRelAbsVector CLLinearGradient::mX1
protected

Definition at line 32 of file CLLinearGradient.h.

Referenced by getXPoint1(), and setPoint1().

CLRelAbsVector CLLinearGradient::mX2
protected

Definition at line 35 of file CLLinearGradient.h.

Referenced by getXPoint2(), and setPoint2().

CLRelAbsVector CLLinearGradient::mY1
protected

Definition at line 33 of file CLLinearGradient.h.

Referenced by getYPoint1(), and setPoint1().

CLRelAbsVector CLLinearGradient::mY2
protected

Definition at line 36 of file CLLinearGradient.h.

Referenced by getYPoint2(), and setPoint2().

CLRelAbsVector CLLinearGradient::mZ1
protected

Definition at line 34 of file CLLinearGradient.h.

Referenced by getZPoint1(), and setPoint1().

CLRelAbsVector CLLinearGradient::mZ2
protected

Definition at line 37 of file CLLinearGradient.h.

Referenced by getZPoint2(), and setPoint2().


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