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

#include <CLImage.h>

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

Public Member Functions

 CLImage (CCopasiContainer *pParent=NULL)
 
 CLImage (const CLImage &source, CCopasiContainer *pParent=NULL)
 
 CLImage (const Image &source, CCopasiContainer *pParent=NULL)
 
const CLRelAbsVectorgetHeight () const
 
const std::string & getImageReference () const
 
const std::string & getKey () const
 
const CLRelAbsVectorgetWidth () const
 
CLRelAbsVectorgetX ()
 
const CLRelAbsVectorgetX () const
 
CLRelAbsVectorgetY ()
 
const CLRelAbsVectorgetY () const
 
CLRelAbsVectorgetZ ()
 
const CLRelAbsVectorgetZ () const
 
bool isSetImageReference () const
 
void setCoordinates (const CLRelAbsVector &x, const CLRelAbsVector &y, const CLRelAbsVector &z=CLRelAbsVector(0.0, 0.0))
 
void setDimensions (const CLRelAbsVector &width, const CLRelAbsVector &height)
 
void setHeight (const CLRelAbsVector &height)
 
void setImageReference (const std::string &ref)
 
void setWidth (const CLRelAbsVector &width)
 
void setX (const CLRelAbsVector &coord)
 
void setY (const CLRelAbsVector &coord)
 
void setZ (const CLRelAbsVector &coord)
 
Image * toSBML (unsigned int level, unsigned int version) const
 
 ~CLImage ()
 
- Public Member Functions inherited from CLTransformation2D
 CLTransformation2D ()
 
 CLTransformation2D (const double m[6])
 
 CLTransformation2D (const Transformation2D &source)
 
std::string get2DTransformationString () const
 
const double * getMatrix2D () const
 
virtual void parseTransformation (const std::string &transformationString)
 
void setMatrix (const double m[12])
 
void setMatrix2D (const double m[6])
 
- Public Member Functions inherited from CLTransformation
 CLTransformation ()
 
 CLTransformation (const double matrix[12])
 
std::string get3DTransformationString () const
 
virtual const double * getMatrix () const
 
bool is2DTransformation () const
 
bool isIdentityMatrix () const
 
bool isSetMatrix () const
 
void setMatrix (const double m[12])
 
- 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

CLRelAbsVector mHeight
 
std::string mHRef
 
std::string mKey
 
CLRelAbsVector mWidth
 
CLRelAbsVector mX
 
CLRelAbsVector mY
 
CLRelAbsVector mZ
 
- Protected Attributes inherited from CLTransformation2D
double mMatrix2D [6]
 
- Protected Attributes inherited from CLTransformation
double mMatrix [12]
 
- Protected Attributes inherited from CLBase
std::string mTag
 

Private Member Functions

CLImageoperator= (const CLImage &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 CLTransformation2D
static const double * getIdentityMatrix2D ()
 
- Static Public Member Functions inherited from CLTransformation
static const double * getIdentityMatrix ()
 
- 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 CLTransformation2D
static const double IDENTITY2D [6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0}
 
- Static Public Attributes inherited from CLTransformation
static const double IDENTITY3D [12] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}
 
- 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 CLTransformation2D
virtual void addSBMLAttributes (Transformation2D *pTransformation) const
 
void updateMatrix2D ()
 
void updateMatrix3D ()
 
- 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 CLImage.h.

Constructor & Destructor Documentation

CLImage::CLImage ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 24 of file CLImage.cpp.

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

24  :
26  CCopasiObject("Image", pParent),
27  mX(CLRelAbsVector(0.0, 0.0)),
28  mY(CLRelAbsVector(0.0, 0.0)),
29  mZ(CLRelAbsVector(0.0, 0.0)),
30  mWidth(CLRelAbsVector(0.0, 0.0)),
31  mHeight(CLRelAbsVector(0.0, 0.0)),
32  mHRef(""),
33  mKey("")
34 {
35  this->mKey = CCopasiRootContainer::getKeyFactory()->add("Image", this);
36 }
CLRelAbsVector mY
Definition: CLImage.h:34
std::string mKey
Definition: CLImage.h:43
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ
Definition: CLImage.h:35
static CKeyFactory * getKeyFactory()
CLRelAbsVector mHeight
Definition: CLImage.h:37
CLRelAbsVector mWidth
Definition: CLImage.h:36
CLRelAbsVector mX
Definition: CLImage.h:33
std::string mHRef
Definition: CLImage.h:38
CLImage::CLImage ( const CLImage source,
CCopasiContainer pParent = NULL 
)

Copy Constructor.

Definition at line 41 of file CLImage.cpp.

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

41  :
42  CLTransformation2D(source),
43  CCopasiObject(source, pParent),
44  mX(source.mX),
45  mY(source.mY),
46  mZ(source.mZ),
47  mWidth(source.mWidth),
48  mHeight(source.mHeight),
49  mHRef(source.mHRef),
50  mKey("")
51 {
52  this->mKey = CCopasiRootContainer::getKeyFactory()->add("Image", this);
53 }
CLRelAbsVector mY
Definition: CLImage.h:34
std::string mKey
Definition: CLImage.h:43
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ
Definition: CLImage.h:35
static CKeyFactory * getKeyFactory()
CLRelAbsVector mHeight
Definition: CLImage.h:37
CLRelAbsVector mWidth
Definition: CLImage.h:36
CLRelAbsVector mX
Definition: CLImage.h:33
std::string mHRef
Definition: CLImage.h:38
CLImage::CLImage ( const Image &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 58 of file CLImage.cpp.

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

58  :
59  CLTransformation2D(source),
60  CCopasiObject("Image", pParent),
61  mX(source.getX()),
62  mY(source.getY()),
63  mZ(source.getZ()),
64  mWidth(source.getWidth()),
65  mHeight(source.getHeight()),
66  mHRef(source.getImageReference()),
67  mKey("")
68 {
69  this->mKey = CCopasiRootContainer::getKeyFactory()->add("Image", this);
70 }
CLRelAbsVector mY
Definition: CLImage.h:34
std::string mKey
Definition: CLImage.h:43
std::string add(const std::string &prefix, CCopasiObject *pObject)
CLRelAbsVector mZ
Definition: CLImage.h:35
static CKeyFactory * getKeyFactory()
CLRelAbsVector mHeight
Definition: CLImage.h:37
CLRelAbsVector mWidth
Definition: CLImage.h:36
CLRelAbsVector mX
Definition: CLImage.h:33
std::string mHRef
Definition: CLImage.h:38
CLImage::~CLImage ( )

Destructor.

Destructor

Definition at line 75 of file CLImage.cpp.

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

76 {
78 }
bool remove(const std::string &key)
std::string mKey
Definition: CLImage.h:43
static CKeyFactory * getKeyFactory()

Member Function Documentation

const CLRelAbsVector & CLImage::getHeight ( ) const

Returns the height.

Definition at line 116 of file CLImage.cpp.

References mHeight.

Referenced by CLLayoutRenderer::draw_image(), fillItemFromImage(), and CCopasiXML::saveImageElement().

117 {
118  return this->mHeight;
119 }
CLRelAbsVector mHeight
Definition: CLImage.h:37
const std::string & CLImage::getImageReference ( ) const

Returns the image reference.

Definition at line 132 of file CLImage.cpp.

References mHRef.

Referenced by CLLayoutRenderer::draw_image(), fillItemFromImage(), and CCopasiXML::saveImageElement().

133 {
134  return this->mHRef;
135 }
std::string mHRef
Definition: CLImage.h:38
const std::string & CLImage::getKey ( ) const
virtual

Returns the key string of the object.

Returns the key of the color definition.

Reimplemented from CCopasiObject.

Definition at line 232 of file CLImage.cpp.

References mKey.

233 {
234  return this->mKey;
235 }
std::string mKey
Definition: CLImage.h:43
const CLRelAbsVector & CLImage::getWidth ( ) const

Returns the width.

Definition at line 108 of file CLImage.cpp.

References mWidth.

Referenced by CLLayoutRenderer::draw_image(), fillItemFromImage(), and CCopasiXML::saveImageElement().

109 {
110  return this->mWidth;
111 }
CLRelAbsVector mWidth
Definition: CLImage.h:36
CLRelAbsVector & CLImage::getX ( )

Returns the x coordinate.

Definition at line 198 of file CLImage.cpp.

References mX.

Referenced by CLLayoutRenderer::draw_image(), fillItemFromImage(), and CCopasiXML::saveImageElement().

199 {
200  return this->mX;
201 }
CLRelAbsVector mX
Definition: CLImage.h:33
const CLRelAbsVector & CLImage::getX ( ) const

Returns the x coordinate.

Definition at line 174 of file CLImage.cpp.

References mX.

175 {
176  return this->mX;
177 }
CLRelAbsVector mX
Definition: CLImage.h:33
CLRelAbsVector & CLImage::getY ( )

Returns the y coordinate.

Definition at line 206 of file CLImage.cpp.

References mY.

Referenced by CLLayoutRenderer::draw_image(), fillItemFromImage(), and CCopasiXML::saveImageElement().

207 {
208  return this->mY;
209 }
CLRelAbsVector mY
Definition: CLImage.h:34
const CLRelAbsVector & CLImage::getY ( ) const

Returns the y coordinate.

Definition at line 182 of file CLImage.cpp.

References mY.

183 {
184  return this->mY;
185 }
CLRelAbsVector mY
Definition: CLImage.h:34
CLRelAbsVector & CLImage::getZ ( )

Returns the z coordinate.

Definition at line 214 of file CLImage.cpp.

References mZ.

Referenced by CCopasiXML::saveImageElement().

215 {
216  return this->mZ;
217 }
CLRelAbsVector mZ
Definition: CLImage.h:35
const CLRelAbsVector & CLImage::getZ ( ) const

Returns the z coordinate.

Definition at line 190 of file CLImage.cpp.

References mZ.

191 {
192  return this->mZ;
193 }
CLRelAbsVector mZ
Definition: CLImage.h:35
bool CLImage::isSetImageReference ( ) const

Returns true if the image reference has been set.

Definition at line 222 of file CLImage.cpp.

References mHRef.

Referenced by CLLayoutRenderer::draw_image().

223 {
224  std::string space = " \t\n\r";
225  // the string may not be empty and it may not only contain whitespaces
226  return (!this->mHRef.empty() && (this->mHRef.find_first_not_of(space) != std::string::npos));
227 }
std::string mHRef
Definition: CLImage.h:38
CLImage& CLImage::operator= ( const CLImage source)
private
void CLImage::setCoordinates ( const CLRelAbsVector x,
const CLRelAbsVector y,
const CLRelAbsVector z = CLRelAbsVector(0.0, 0.0) 
)

Sets the coordinates.

Definition at line 140 of file CLImage.cpp.

References mX, mY, and mZ.

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

141 {
142  this->mX = x;
143  this->mY = y;
144  this->mZ = z;
145 }
CLRelAbsVector mY
Definition: CLImage.h:34
CLRelAbsVector mZ
Definition: CLImage.h:35
CLRelAbsVector mX
Definition: CLImage.h:33
void CLImage::setDimensions ( const CLRelAbsVector width,
const CLRelAbsVector height 
)

Sets the dimensions.

Definition at line 83 of file CLImage.cpp.

References mHeight, and mWidth.

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

84 {
85  this->mWidth = width;
86  this->mHeight = height;
87 }
CLRelAbsVector mHeight
Definition: CLImage.h:37
CLRelAbsVector mWidth
Definition: CLImage.h:36
void CLImage::setHeight ( const CLRelAbsVector height)

Sets the height.

Definition at line 100 of file CLImage.cpp.

References mHeight.

101 {
102  this->mHeight = height;
103 }
CLRelAbsVector mHeight
Definition: CLImage.h:37
void CLImage::setImageReference ( const std::string &  ref)

Sets the reference to the image location.

Definition at line 124 of file CLImage.cpp.

References mHRef.

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

125 {
126  this->mHRef = ref;
127 }
std::string mHRef
Definition: CLImage.h:38
void CLImage::setWidth ( const CLRelAbsVector width)

Sets the width.

Definition at line 92 of file CLImage.cpp.

References mWidth.

93 {
94  this->mWidth = width;
95 }
CLRelAbsVector mWidth
Definition: CLImage.h:36
void CLImage::setX ( const CLRelAbsVector coord)

Sets the x coordinate.

Definition at line 150 of file CLImage.cpp.

References mX.

151 {
152  this->mX = coord;
153 }
CLRelAbsVector mX
Definition: CLImage.h:33
void CLImage::setY ( const CLRelAbsVector coord)

Sets the y coordinate.

Definition at line 158 of file CLImage.cpp.

References mY.

159 {
160  this->mY = coord;
161 }
CLRelAbsVector mY
Definition: CLImage.h:34
void CLImage::setZ ( const CLRelAbsVector coord)

Sets the z coordinate.

Definition at line 166 of file CLImage.cpp.

References mZ.

167 {
168  this->mZ = coord;
169 }
CLRelAbsVector mZ
Definition: CLImage.h:35
Image * CLImage::toSBML ( unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 240 of file CLImage.cpp.

References CLTransformation2D::addSBMLAttributes(), mHeight, mHRef, mWidth, mX, mY, mZ, and CLRelAbsVector::toSBML().

241 {
242  Image* pImg = new Image(level, version);
243  this->addSBMLAttributes(pImg);
244  RelAbsVector* pV = this->mX.toSBML();
245  pImg->setX(*pV);
246  delete pV;
247  pV = this->mY.toSBML();
248  pImg->setY(*pV);
249  delete pV;
250  pV = this->mZ.toSBML();
251  pImg->setZ(*pV);
252  delete pV;
253  pV = this->mWidth.toSBML();
254  pImg->setWidth(*pV);
255  delete pV;
256  pV = this->mHeight.toSBML();
257  pImg->setHeight(*pV);
258  delete pV;
259  pImg->setImageReference(this->mHRef);
260  return pImg;
261 }
CLRelAbsVector mY
Definition: CLImage.h:34
virtual void addSBMLAttributes(Transformation2D *pTransformation) const
RelAbsVector * toSBML() const
CLRelAbsVector mZ
Definition: CLImage.h:35
CLRelAbsVector mHeight
Definition: CLImage.h:37
CLRelAbsVector mWidth
Definition: CLImage.h:36
CLRelAbsVector mX
Definition: CLImage.h:33
std::string mHRef
Definition: CLImage.h:38

Member Data Documentation

CLRelAbsVector CLImage::mHeight
protected

Definition at line 37 of file CLImage.h.

Referenced by getHeight(), setDimensions(), setHeight(), and toSBML().

std::string CLImage::mHRef
protected

Definition at line 38 of file CLImage.h.

Referenced by getImageReference(), isSetImageReference(), setImageReference(), and toSBML().

std::string CLImage::mKey
protected

key for the object.

Definition at line 43 of file CLImage.h.

Referenced by CLImage(), getKey(), and ~CLImage().

CLRelAbsVector CLImage::mWidth
protected

Definition at line 36 of file CLImage.h.

Referenced by getWidth(), setDimensions(), setWidth(), and toSBML().

CLRelAbsVector CLImage::mX
protected

Definition at line 33 of file CLImage.h.

Referenced by getX(), setCoordinates(), setX(), and toSBML().

CLRelAbsVector CLImage::mY
protected

Definition at line 34 of file CLImage.h.

Referenced by getY(), setCoordinates(), setY(), and toSBML().

CLRelAbsVector CLImage::mZ
protected

Definition at line 35 of file CLImage.h.

Referenced by getZ(), setCoordinates(), setZ(), and toSBML().


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