COPASI API  4.16.103
CLRenderCurve.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layout/CLRenderCurve.h,v $
3 // $Revision: 1.5 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/09/30 16:35:20 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef CLRenderCurve_H__
15 #define CLRenderCurve_H__
16 
17 #include <string>
18 #include <vector>
19 
22 
24 class CLRenderPoint;
25 class RenderCurve;
26 
28 {
29 private:
30  // prevent the compiler from generating an assignment operator
31  CLRenderCurve& operator=(const CLRenderCurve& source);
32 
33 protected:
34  std::string mStartHead;
35  std::string mEndHead;
36  std::vector<CLRenderPoint*> mListOfElements;
37 
38  /**
39  * key for the object.
40  */
41  std::string mKey;
42 
43 public:
44  /**
45  * Constructor.
46  */
47  CLRenderCurve(CCopasiContainer* pParent = NULL);
48 
49  /**
50  * Copy Constructor
51  */
52  CLRenderCurve(const CLRenderCurve& source, CCopasiContainer* pParent = NULL);
53 
54  /**
55  * Constructor to generate object from the corresponding SBML object.
56  */
57  CLRenderCurve(const RenderCurve& source, CCopasiContainer* pParent = NULL);
58 
59  /**
60  * Destructor
61  */
63 
64  /**
65  * Sets the id of the start head.
66  */
67  void setStartHead(const std::string& startHead);
68 
69  /**
70  * Sets the id of the end head.
71  */
72  void setEndHead(const std::string& endHead);
73 
74  /**
75  * Returns the id of the start head.
76  */
77  const std::string& getStartHead() const;
78 
79  /**
80  * Returns the id of the end head.
81  */
82  const std::string& getEndHead() const;
83 
84  /**
85  * Returns the number of curve segments.
86  */
87  size_t getNumElements() const;
88 
89  /**
90  * Creates a new bezier element.
91  * The element is added to the curve.
92  */
94 
95  /**
96  * Creates a new point element.
97  * The element is added to the curve.
98  */
100 
101  /**
102  * Returns a const pointer to the curve segment with the given index or NULL if
103  * the id is invalid.
104  */
105  const CLRenderPoint* getCurveElement(size_t index) const;
106 
107  /**
108  * Returns a pointer to the curve segment with the given index or NULL if
109  * the id is invalid.
110  */
111  CLRenderPoint* getCurveElement(size_t index);
112 
113  /**
114  * Adds a copy of the given curve segment to the end of the list of
115  *curve segments.
116  */
117  void addCurveElement(const CLRenderPoint* cs);
118 
119  /**
120  * Removes the curve segment with the given index.
121  */
122  void removeCurveElement(size_t i);
123 
124  /**
125  * Returns a const pointer to the list of curve segments.
126  */
127  const std::vector<CLRenderPoint*>* getListOfCurveElements() const;
128 
129  /**
130  * Returns a pointer to the list of curve segments.
131  */
132  std::vector<CLRenderPoint*>* getListOfCurveElements();
133 
134  /**
135  * Returns true if the start head is set or false otherwise.
136  */
137  bool isSetStartHead() const;
138 
139  /**
140  * Returns true if the start head is set or false otherwise.
141  */
142  bool isSetEndHead() const;
143 
144  /**
145  * Returns the key string of the object.
146  */
147  const std::string& getKey() const;
148 
149  /**
150  * Converts this object to the corresponding SBML object.
151  */
152  RenderCurve* toSBML(unsigned int level, unsigned int version) const;
153 
154 protected:
155  friend class Group;
156 };
157 
158 #endif /* CLRenderCurve_H__ */
void addCurveElement(const CLRenderPoint *cs)
CLRenderCurve & operator=(const CLRenderCurve &source)
void setStartHead(const std::string &startHead)
const std::string & getStartHead() const
size_t getNumElements() const
CLRenderPoint * createPoint()
void setEndHead(const std::string &endHead)
const CLRenderPoint * getCurveElement(size_t index) const
const std::string & getEndHead() const
RenderCurve * toSBML(unsigned int level, unsigned int version) const
bool isSetStartHead() const
std::string mStartHead
Definition: CLRenderCurve.h:34
const std::string & getKey() const
bool isSetEndHead() const
std::vector< CLRenderPoint * > mListOfElements
Definition: CLRenderCurve.h:36
void removeCurveElement(size_t i)
std::string mKey
Definition: CLRenderCurve.h:41
const std::vector< CLRenderPoint * > * getListOfCurveElements() const
std::string mEndHead
Definition: CLRenderCurve.h:35
CLRenderCubicBezier * createCubicBezier()
CLRenderCurve(CCopasiContainer *pParent=NULL)
friend class Group