COPASI API  4.16.103
CLBase.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #define USE_LAYOUT 1
16 
17 #include <sbml/packages/layout/sbml/BoundingBox.h>
18 
19 #include "CLBase.h"
20 
21 //sbml constructors
22 
23 CLPoint::CLPoint(const Point& p) :
24  mX(p.getXOffset())
25  , mY(p.getYOffset())
26  , mZ(p.getZOffset())
27 {}
28 
29 Point CLPoint::getSBMLPoint() const
30 {
31  Point p(new LayoutPkgNamespaces(), mX, mY, mZ);
32  return p;
33 }
34 
35 //***********************************************************
36 
37 CLDimensions::CLDimensions(const Dimensions& d) :
38  mWidth(d.getWidth())
39  , mHeight(d.getHeight())
40  , mDepth(d.getDepth())
41 {}
42 
44 {
45  Dimensions d(new LayoutPkgNamespaces()
46  , mWidth
47  , mHeight
48  , mDepth
49  );
50  return d;
51 }
52 
53 //***********************************************************
54 
55 CLBoundingBox::CLBoundingBox(const BoundingBox & bb)
56  : mPosition(*bb.getPosition()),
57  mDimensions(*bb.getDimensions())
58 {}
59 
61 {
62  return BoundingBox(new LayoutPkgNamespaces(), "", mPosition.getX(), mPosition.getY(),
64 }
65 
66 //***********************************************************
67 
68 std::ostream & operator<<(std::ostream &os, const CLPoint & p)
69 {
70  os << "(x=" << p.mX << ", y=" << p.mY << ")";
71  return os;
72 }
73 
74 std::ostream & operator<<(std::ostream &os, const CLDimensions & d)
75 {
76  os << "(w=" << d.mWidth << ", h=" << d.mHeight << ")";
77  return os;
78 }
79 
80 std::ostream & operator<<(std::ostream &os, const CLBoundingBox & bb)
81 {
82  os << "[" << bb.mPosition << bb.mDimensions << "]";
83  return os;
84 }
CLDimensions()
Definition: CLBase.h:190
const C_FLOAT64 & getWidth() const
Definition: CLBase.h:211
std::ostream & operator<<(std::ostream &os, const CLPoint &p)
Definition: CLBase.cpp:68
Point getSBMLPoint() const
Definition: CLBase.cpp:29
CLBoundingBox()
Definition: CLBase.h:254
Dimensions getSBMLDimensions() const
Definition: CLBase.cpp:43
C_FLOAT64 mZ
Definition: CLBase.h:59
C_FLOAT64 mWidth
Definition: CLBase.h:185
const C_FLOAT64 & getX() const
Definition: CLBase.h:83
Definition: CLBase.h:54
C_FLOAT64 mY
Definition: CLBase.h:58
C_FLOAT64 mX
Definition: CLBase.h:58
const C_FLOAT64 & getY() const
Definition: CLBase.h:84
CLPoint()
Definition: CLBase.h:63
const C_FLOAT64 & getHeight() const
Definition: CLBase.h:212
C_FLOAT64 mDepth
Definition: CLBase.h:186
C_FLOAT64 mHeight
Definition: CLBase.h:185
BoundingBox getSBMLBoundingBox() const
Definition: CLBase.cpp:60
CLPoint mPosition
Definition: CLBase.h:248
CLDimensions mDimensions
Definition: CLBase.h:250