COPASI API  4.16.103
CLGradientStop.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layout/CLGradientStop.h,v $
3 // $Revision: 1.4 $
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 CLGradientStop_H__
15 #define CLGradientStop_H__
16 
17 #include <string>
18 
19 #include "copasi/layout/CLBase.h"
22 
23 class CCopasiContainer;
24 class GradientStop;
25 
26 class CLGradientStop : public CLBase, public CCopasiObject
27 {
28 private:
29  // prevent the compiler from generating the assignment operator
30  CLGradientStop& operator=(const CLGradientStop& source);
31 
32 protected:
34  std::string mStopColor;
35 
36  /**
37  * key string for the gradient stop.
38  */
39  std::string mKey;
40 
41 public:
42  /**
43  * Constructor.
44  */
45  CLGradientStop(CCopasiContainer* pParent = NULL);
46 
47  /**
48  * Copy Constructor
49  */
50  CLGradientStop(const CLGradientStop& source, CCopasiContainer* pParent = NULL);
51 
52  /**
53  * Constructor to generate object from the corresponding SBML object.
54  */
55  CLGradientStop(const GradientStop& source, CCopasiContainer* pParent = NULL);
56 
57  /**
58  * Virtual destructor to satify the linker.
59  */
60  virtual ~CLGradientStop();
61 
62  /**
63  * Returns the offset.
64  */
65  const CLRelAbsVector& getOffset() const;
66 
67  /**
68  * Sets the offset.
69  */
70  void setOffset(double x, double y);
71 
72  /**
73  * Sets the offset.
74  */
75  void setOffset(const std::string&);
76 
77  /**
78  * Sets the offset.
79  */
80  void setOffset(const CLRelAbsVector& co);
81 
82  /**
83  * Returns the stop color id.
84  */
85  const std::string& getStopColor() const;
86 
87  /**
88  * Sets the stop color id.
89  */
90  void setStopColor(const std::string& key);
91 
92  /**
93  * Returns the key of the color definition.
94  */
95  const std::string& getKey() const;
96 
97  /**
98  * Converts this object to the corresponding SBML object.
99  */
100  GradientStop* toSBML(unsigned int level, unsigned int version) const;
101 };
102 
103 #endif /* CLGradientStop */
CLGradientStop(CCopasiContainer *pParent=NULL)
CLGradientStop & operator=(const CLGradientStop &source)
void setStopColor(const std::string &key)
const std::string & getStopColor() const
virtual ~CLGradientStop()
GradientStop * toSBML(unsigned int level, unsigned int version) const
const CLRelAbsVector & getOffset() const
Definition: CLBase.h:33
void setOffset(double x, double y)
CLRelAbsVector mOffset
std::string mKey
const std::string & getKey() const
std::string mStopColor