COPASI API  4.16.103
CReportDefinition.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/report/CReportDefinition.h,v $
3 // $Revision: 1.40 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2007/02/23 18:51:39 $
7 // End CVS Header
8 
9 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc. and EML Research, gGmbH.
11 // All rights reserved.
12 
13 /****************************************************************************
14  *
15  * Created: Tue Aug 11 2003
16  * by: Liang Xu
17  *
18  * Created for Copasi by Liang Xu
19  ****************************************************************************/
20 
21 #ifndef COPASI_CReport_Definition
22 #define COPASI_CReport_Definition
23 
24 #include <string>
25 #include <vector>
26 
27 #include "report/CCopasiObject.h"
30 #include "utilities/CCopasiTask.h"
31 
32 class CReportDefinition;
33 class CComment;
34 class CHeaderFooter;
35 class CReportBody;
36 class CReportObject;
37 class CReport;
38 class CReportTable;
39 
41  {
42  // Operations
43  private:
44  std::string mKey;
45  std::string mComment;
47 
48  std::vector<CRegisteredObjectName> mHeaderVector;
49  std::vector<CRegisteredObjectName> mBodyVector;
50  std::vector<CRegisteredObjectName> mFooterVector;
51  std::vector<CRegisteredObjectName> mTableVector;
52 
54  bool mTable;
55  bool mbTitle;
56  unsigned C_INT32 mPrecision;
57 
58  public:
59  /**
60  * Default constructor.
61  */
62  CReportDefinition(const std::string & name = "NoName",
63  const CCopasiContainer * pParent = NULL);
64 
65  /**
66  * Copy constructor.
67  */
69  const CCopasiContainer * pParent = NULL);
70 
71  /**
72  * Destructor.
73  */
75 
76  /**
77  *cleanup
78  */
79  void cleanup();
80 
81  /**
82  * Convert the table list into a header and body list.
83  * @param const std::vector< CCopasiContainer * > & listOfContainer
84  * (default: CCopasiContainer::EmptyList)
85  * @return bool success
86  */
87  bool preCompileTable(const std::vector< CCopasiContainer * > & listOfContainer = CCopasiContainer::EmptyList);
88 
89  /**
90  *Returns the comments in the report tag
91  */
92  const std::string & getComment() const
93  {
94  return mComment;
95  }
96 
97  /**
98  *sets the comments in the report tag
99  */
100  void setComment(const std::string & comment)
101  {
102  mComment = comment;
103  }
104 
105  /**
106  *gets the body in the report tag
107  */
108  std::vector<CRegisteredObjectName>* getBodyAddr();
109 
110  /**
111  *gets the header in the report tag
112  */
113  std::vector<CRegisteredObjectName>* getHeaderAddr();
114 
115  /**
116  *gets the footer in the report tag
117  */
118  std::vector<CRegisteredObjectName>* getFooterAddr();
119 
120  /**
121  *gets the footer in the report tag
122  */
123  std::vector<CRegisteredObjectName>* getTableAddr();
124 
125  /**
126  *
127  */
128  bool setTaskType(const CCopasiTask::Type & taskType);
129 
130  /**
131  *
132  */
133  const CCopasiTask::Type & getTaskType() const;
134 
135  /**
136  *
137  */
139 
140  /**
141  *
142  */
143  const CCopasiReportSeparator & getSeparator() const;
144 
145  /**
146  *
147  */
148  bool getTitle() const;
149 
150  /**
151  *
152  */
153  void setTitle(bool title);
154 
155  /**
156  *
157  */
158  bool isTable() const;
159 
160  /**
161  *
162  */
163  void setIsTable(bool table);
164 
165  /**
166  * Set the precsion for floating point numbers;
167  * @param const unsigned C_INT32 & precision
168  */
169  void setPrecision(const unsigned C_INT32 & precision);
170 
171  /**
172  * Retrieve the precsion for floating point numbers;
173  * @return const unsigned C_INT32 & precision
174  */
175  const unsigned C_INT32 & getPrecision() const;
176 
177  /**
178  *
179  */
180  virtual const std::string & getKey() const;
181 
182  private:
183  /**
184  * This adds header and body entries for one table element
185  * (including separator if necessary)
186  * @param const CCopasiObject * pObject
187  */
188  void addTableElement(const CCopasiObject * pObject);
189  };
190 
191 #endif
bool setTaskType(const CCopasiTask::Type &taskType)
std::vector< CRegisteredObjectName > mHeaderVector
void setTitle(bool title)
std::vector< CRegisteredObjectName > mFooterVector
const CCopasiTask::Type & getTaskType() const
const CCopasiReportSeparator & getSeparator() const
CCopasiTask::Type mTaskType
void setSeparator(const CCopasiReportSeparator &Separator)
#define C_INT32
Definition: copasi.h:90
std::vector< CRegisteredObjectName > mTableVector
const std::string & getComment() const
const unsigned C_INT32 & getPrecision() const
void setIsTable(bool table)
static const std::vector< CCopasiContainer * > EmptyList
void setComment(const std::string &comment)
std::vector< CRegisteredObjectName > * getTableAddr()
std::vector< CRegisteredObjectName > * getFooterAddr()
std::vector< CRegisteredObjectName > mBodyVector
virtual const std::string & getKey() const
CReportDefinition(const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
CCopasiReportSeparator mSeparator
void setPrecision(const unsigned C_INT32 &precision)
std::vector< CRegisteredObjectName > * getBodyAddr()
void addTableElement(const CCopasiObject *pObject)
unsigned C_INT32 mPrecision
std::vector< CRegisteredObjectName > * getHeaderAddr()
bool preCompileTable(const std::vector< CCopasiContainer * > &listOfContainer=CCopasiContainer::EmptyList)