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

#include <CLBase.h>

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

Public Member Functions

 CLDimensions ()
 
 CLDimensions (const C_FLOAT64 &w, const C_FLOAT64 &h, const C_FLOAT64 &d=0.0)
 
 CLDimensions (const Dimensions &d)
 
const C_FLOAT64getDepth () const
 
C_FLOAT64getDepth ()
 
const C_FLOAT64getHeight () const
 
C_FLOAT64getHeight ()
 
Dimensions getSBMLDimensions () const
 
const C_FLOAT64getWidth () const
 
C_FLOAT64getWidth ()
 
void scale (const double &scaleFactor)
 
void setDepth (const C_FLOAT64 &d)
 
void setHeight (const C_FLOAT64 &h)
 
void setWidth (const C_FLOAT64 &w)
 
- 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 ()
 

Protected Attributes

C_FLOAT64 mDepth
 
C_FLOAT64 mHeight
 
C_FLOAT64 mWidth
 
- Protected Attributes inherited from CLBase
std::string mTag
 

Friends

std::ostream & operator<< (std::ostream &os, const CLDimensions &d)
 

Detailed Description

This class describes a size in a layout. It is 2-dimensional at the moment.

Definition at line 181 of file CLBase.h.

Constructor & Destructor Documentation

CLDimensions::CLDimensions ( )
inline

Definition at line 190 of file CLBase.h.

190  :
191  mWidth(0.0)
192  , mHeight(0.0)
193  , mDepth(0.0)
194 
195  {};
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185
CLDimensions::CLDimensions ( const C_FLOAT64 w,
const C_FLOAT64 h,
const C_FLOAT64 d = 0.0 
)
inline

Definition at line 197 of file CLBase.h.

200  :
201  mWidth(w)
202  , mHeight(h)
203  , mDepth(d)
204  {};
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185
CLDimensions::CLDimensions ( const Dimensions &  d)

constructor from libsbml object

Definition at line 37 of file CLBase.cpp.

37  :
38  mWidth(d.getWidth())
39  , mHeight(d.getHeight())
40  , mDepth(d.getDepth())
41 {}
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185

Member Function Documentation

const C_FLOAT64& CLDimensions::getDepth ( ) const
inline

Definition at line 213 of file CLBase.h.

References mDepth.

Referenced by CLLayoutRenderer::convert_to_absolute(), CLLayoutRenderer::draw_ellipse(), and CLLayoutRenderer::draw_text().

213 {return mDepth;};
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64& CLDimensions::getDepth ( )
inline

Definition at line 217 of file CLBase.h.

References mDepth.

217 {return mDepth;};
C_FLOAT64 mDepth
Definition: CLBase.h:186
const C_FLOAT64& CLDimensions::getHeight ( ) const
inline
C_FLOAT64& CLDimensions::getHeight ( )
inline

Definition at line 216 of file CLBase.h.

References mHeight.

216 {return mHeight;};
C_FLOAT64 mHeight
Definition: CLBase.h:185
Dimensions CLDimensions::getSBMLDimensions ( ) const

convert to sbml dimension

Definition at line 43 of file CLBase.cpp.

References mDepth, mHeight, and mWidth.

Referenced by CLayout::exportToSBML().

44 {
45  Dimensions d(new LayoutPkgNamespaces()
46  , mWidth
47  , mHeight
48  , mDepth
49  );
50  return d;
51 }
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185
const C_FLOAT64& CLDimensions::getWidth ( ) const
inline
C_FLOAT64& CLDimensions::getWidth ( )
inline

Definition at line 215 of file CLBase.h.

References mWidth.

215 {return mWidth;};
C_FLOAT64 mWidth
Definition: CLBase.h:185
void CLDimensions::scale ( const double &  scaleFactor)
inline

Definition at line 223 of file CLBase.h.

References mDepth, mHeight, and mWidth.

Referenced by CLayout::scale(), and CLBoundingBox::scale().

224  {
225  mWidth *= scaleFactor;
226  mHeight *= scaleFactor;
227  mDepth *= scaleFactor;
228  }
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185
void CLDimensions::setDepth ( const C_FLOAT64 d)
inline

Definition at line 221 of file CLBase.h.

References mDepth.

221 {mDepth = d;};
C_FLOAT64 mDepth
Definition: CLBase.h:186
void CLDimensions::setHeight ( const C_FLOAT64 h)
inline

Definition at line 220 of file CLBase.h.

References mHeight.

Referenced by CQGLLayoutPainter::calculateAndAssignBounds(), and CLGraphicalObject::setHeight().

220 {mHeight = h;};
C_FLOAT64 mHeight
Definition: CLBase.h:185
void CLDimensions::setWidth ( const C_FLOAT64 w)
inline

Definition at line 219 of file CLBase.h.

References mWidth.

Referenced by CQGLLayoutPainter::calculateAndAssignBounds(), and CLGraphicalObject::setWidth().

219 {mWidth = w;};
C_FLOAT64 mWidth
Definition: CLBase.h:185

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CLDimensions d 
)
friend

insert operator

Definition at line 74 of file CLBase.cpp.

75 {
76  os << "(w=" << d.mWidth << ", h=" << d.mHeight << ")";
77  return os;
78 }
C_FLOAT64 mWidth
Definition: CLBase.h:185
C_FLOAT64 mHeight
Definition: CLBase.h:185

Member Data Documentation

C_FLOAT64 CLDimensions::mDepth
protected

Definition at line 186 of file CLBase.h.

Referenced by getDepth(), getSBMLDimensions(), scale(), and setDepth().

C_FLOAT64 CLDimensions::mHeight
protected

Definition at line 185 of file CLBase.h.

Referenced by getHeight(), getSBMLDimensions(), operator<<(), scale(), and setHeight().

C_FLOAT64 CLDimensions::mWidth
protected

Definition at line 185 of file CLBase.h.

Referenced by getSBMLDimensions(), getWidth(), operator<<(), scale(), and setWidth().


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