COPASI API  4.16.103
CLGraphicalPrimitive1D.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layout/CLGraphicalPrimitive1D.h,v $
3 // $Revision: 1.3 $
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 CLGraphicalPrimitive1D_H__
15 #define CLGraphicalPrimitive1D_H__
16 
17 #include <string>
18 #include <vector>
19 
21 
22 class GraphicalPrimitive1D;
23 
25 {
26 protected:
27  std::string mStroke;
28  double mStrokeWidth;
29  std::vector<unsigned int> mStrokeDashArray;
30 
31 public:
32  /**
33  * Constructor.
34  */
36 
37  /**
38  * Constructor to generate object from the corresponding SBML object.
39  */
40  CLGraphicalPrimitive1D(const GraphicalPrimitive1D& source);
41 
42  /**
43  * Sets the stroke color.
44  */
45  void setStroke(const std::string& key);
46 
47  /**
48  * Sets the stroke width.
49  */
50  void setStrokeWidth(double width);
51 
52  /**
53  * Sets the dasharray.
54  */
55  void setDashArray(const std::vector<unsigned int>& array);
56 
57  /**
58  * Returns the stroke color.
59  */
60  const std::string& getStroke() const;
61 
62  /**
63  * Returns the stroke width.
64  */
65  double getStrokeWidth() const;
66  /**
67  * Returns the stroke color.
68  */
69  const std::vector<unsigned int>& getDashArray() const;
70 
71  /**
72  * Returns true is the stroke width has been set or false otherwise.
73  */
74  bool isSetStrokeWidth() const;
75 
76  /**
77  * Returns true is the stroke has been set or false otherwise.
78  */
79  bool isSetStroke() const;
80 
81  /**
82  * Returns true is the dash array has been set or false otherwise.
83  */
84  bool isSetDashArray() const;
85 
86  void parseDashArray(const std::string& s);
87 
88  /**
89  * Adds the attributes for a graphical primitive 1D object to the passed in.
90  * object.
91  */
92  virtual void addSBMLAttributes(GraphicalPrimitive1D* pPrimitive) const;
93 };
94 
95 #endif /* CLGraphicalPrimitive1D_H__ */
void parseDashArray(const std::string &s)
const std::string & getStroke() const
void setDashArray(const std::vector< unsigned int > &array)
void setStroke(const std::string &key)
std::vector< unsigned int > mStrokeDashArray
void setStrokeWidth(double width)
const std::vector< unsigned int > & getDashArray() const
virtual void addSBMLAttributes(GraphicalPrimitive1D *pPrimitive) const