COPASI API  4.16.103
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CReport Class Reference

#include <CReport.h>

Inheritance diagram for CReport:
Inheritance graph
[legend]
Collaboration diagram for CReport:
Collaboration graph
[legend]

Public Member Functions

const bool & append () const
 
void cleanup ()
 
virtual void close ()
 
virtual bool compile (std::vector< CCopasiContainer * > listOfContainer, const CCopasiDataModel *pDataModel)
 
const bool & confirmOverwrite () const
 
 CReport ()
 
 CReport (const CReport &src)
 
virtual void finish ()
 
CReportDefinitiongetReportDefinition ()
 
std::ostream * getStream () const
 
const std::string & getTarget () const
 
std::ostream * open (const CCopasiDataModel *pDataModel, std::ostream *pOstream=NULL)
 
virtual void output (const Activity &activity)
 
virtual void separate (const Activity &)
 
void setAppend (const bool &append)
 
void setConfirmOverwrite (const bool &confirmOverwrite)
 
void setReportDefinition (CReportDefinition *reportDef)
 
void setTarget (const std::string &target)
 
 ~CReport ()
 
- Public Member Functions inherited from COutputInterface
 COutputInterface ()
 
 COutputInterface (const COutputInterface &src)
 
virtual const std::set< const
CCopasiObject * > & 
getObjects () const
 
virtual ~COutputInterface ()
 

Private Types

enum  State {
  Invalid = -1, Compiled = 0, HeaderHeader, HeaderBody,
  HeaderFooter, BodyHeader, BodyBody, BodyFooter,
  FooterHeader, FooterBody, FooterFooter
}
 

Private Member Functions

bool compileChildReport (CReport *pReport, std::vector< CCopasiContainer * > listOfContainer)
 
void generateObjectsFromName (const std::vector< CCopasiContainer * > *pListOfContainer, std::vector< CCopasiObject * > &objectList, CReport *&pReport, const std::vector< CRegisteredObjectName > *nameVector)
 
void printBody ()
 
void printFooter ()
 
void printHeader ()
 

Private Attributes

bool mAppend
 
std::vector< CCopasiObject * > mBodyObjectList
 
bool mConfirmOverwrite
 
std::vector< CCopasiObject * > mFooterObjectList
 
std::vector< CCopasiObject * > mHeaderObjectList
 
CReportmpBody
 
const CCopasiDataModelmpDataModel
 
CReportmpFooter
 
CReportmpHeader
 
std::ostream * mpOstream
 
CReportDefinitionmpReportDef
 
State mState
 
bool mStreamOwner
 
std::string mTarget
 

Additional Inherited Members

- Public Types inherited from COutputInterface
enum  Activity { BEFORE = 0x01, DURING = 0x02, AFTER = 0x04 }
 
- Protected Attributes inherited from COutputInterface
std::set< const CCopasiObject * > mObjects
 

Detailed Description

Definition at line 38 of file CReport.h.

Member Enumeration Documentation

enum CReport::State
private

Enumeration of the report states.

Enumerator
Invalid 
Compiled 
HeaderHeader 
HeaderBody 
HeaderFooter 
BodyHeader 
BodyBody 
BodyFooter 
FooterHeader 
FooterBody 
FooterFooter 

Definition at line 43 of file CReport.h.

Constructor & Destructor Documentation

CReport::CReport ( )

Default constructor.

Definition at line 34 of file CReport.cpp.

Referenced by generateObjectsFromName().

34  :
36  mpDataModel(NULL),
37  mpOstream(NULL),
38  mStreamOwner(false),
39  mpReportDef(NULL),
40  mTarget(""),
41  mAppend(true),
42  mConfirmOverwrite(true),
46  mpHeader(NULL),
47  mpBody(NULL),
48  mpFooter(NULL),
50 {}
bool mConfirmOverwrite
Definition: CReport.h:66
State mState
Definition: CReport.h:76
std::ostream * mpOstream
Definition: CReport.h:60
std::vector< CCopasiObject * > mHeaderObjectList
Definition: CReport.h:70
CReport * mpFooter
Definition: CReport.h:74
std::vector< CCopasiObject * > mFooterObjectList
Definition: CReport.h:68
std::string mTarget
Definition: CReport.h:64
std::vector< CCopasiObject * > mBodyObjectList
Definition: CReport.h:69
CReportDefinition * mpReportDef
Definition: CReport.h:63
bool mStreamOwner
Definition: CReport.h:61
CReport * mpBody
Definition: CReport.h:73
CReport * mpHeader
Definition: CReport.h:72
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
bool mAppend
Definition: CReport.h:65
CReport::CReport ( const CReport src)

Copy constructor.

Parameters
constCReport & src

Definition at line 52 of file CReport.cpp.

52  :
53  COutputInterface(src),
55  mpOstream(src.mpOstream),
56  mStreamOwner(false),
58  mTarget(src.mTarget),
59  mAppend(src.mAppend),
64  mpHeader(src.mpHeader),
65  mpBody(src.mpBody),
66  mpFooter(src.mpFooter),
68 {}
bool mConfirmOverwrite
Definition: CReport.h:66
State mState
Definition: CReport.h:76
std::ostream * mpOstream
Definition: CReport.h:60
std::vector< CCopasiObject * > mHeaderObjectList
Definition: CReport.h:70
CReport * mpFooter
Definition: CReport.h:74
std::vector< CCopasiObject * > mFooterObjectList
Definition: CReport.h:68
std::string mTarget
Definition: CReport.h:64
std::vector< CCopasiObject * > mBodyObjectList
Definition: CReport.h:69
CReportDefinition * mpReportDef
Definition: CReport.h:63
bool mStreamOwner
Definition: CReport.h:61
CReport * mpBody
Definition: CReport.h:73
CReport * mpHeader
Definition: CReport.h:72
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
bool mAppend
Definition: CReport.h:65
CReport::~CReport ( )

Destructor.

Definition at line 70 of file CReport.cpp.

References cleanup().

71 {cleanup();}
void cleanup()
Definition: CReport.cpp:73

Member Function Documentation

const bool & CReport::append ( ) const

Returns whether the Report Tag is appended or not

Returns
const bool & append

Definition at line 95 of file CReport.cpp.

References mAppend.

Referenced by CQReportDefinitionSelect::loadReportDefinitionVector(), CCopasiXML::saveTaskList(), and setAppend().

96 {return mAppend;}
bool mAppend
Definition: CReport.h:65
void CReport::cleanup ( )

cleanup

Definition at line 73 of file CReport.cpp.

References close(), finish(), mBodyObjectList, mFooterObjectList, and mHeaderObjectList.

Referenced by ~CReport().

74 {
75  mHeaderObjectList.clear();
76  mBodyObjectList.clear();
77  mFooterObjectList.clear();
78 
79  finish();
80  close();
81 }
virtual void finish()
Definition: CReport.cpp:132
std::vector< CCopasiObject * > mHeaderObjectList
Definition: CReport.h:70
std::vector< CCopasiObject * > mFooterObjectList
Definition: CReport.h:68
std::vector< CCopasiObject * > mBodyObjectList
Definition: CReport.h:69
virtual void close()
Definition: CReport.cpp:145
void CReport::close ( )
virtual

Close the stream if applicable

Reimplemented from COutputInterface.

Definition at line 145 of file CReport.cpp.

References mpOstream, mStreamOwner, and pdelete.

Referenced by cleanup().

146 {
148 
149  mpOstream = NULL;
150  mStreamOwner = false;
151 }
#define pdelete(p)
Definition: copasi.h:215
std::ostream * mpOstream
Definition: CReport.h:60
bool mStreamOwner
Definition: CReport.h:61
bool CReport::compile ( std::vector< CCopasiContainer * >  listOfContainer,
const CCopasiDataModel pDataModel 
)
virtual

compile the object list from name vector

Parameters
std::vector<CCopasiContainer * > listOfContainer
constCCopasiDataModel* pDataModel
Returns
bool success

Reimplemented from COutputInterface.

Definition at line 299 of file CReport.cpp.

References compileChildReport(), Compiled, generateObjectsFromName(), CReportDefinition::getBodyAddr(), CReportDefinition::getFooterAddr(), CReportDefinition::getHeaderAddr(), CReportDefinition::isTable(), mBodyObjectList, mFooterObjectList, mHeaderObjectList, COutputInterface::mObjects, mpBody, mpDataModel, mpFooter, mpHeader, mpReportDef, mState, and CReportDefinition::preCompileTable().

Referenced by compileChildReport().

301 {
302  assert(mpDataModel == pDataModel);
303 
304  bool success = true;
306 
307  // check if there is a Report Definition Defined
308  if (!mpReportDef) return false;
309 
310  if (mpReportDef->isTable())
311  if (!mpReportDef->preCompileTable(listOfContainer)) success = false;
312 
315 
316  if (mpHeader)
317  success &= compileChildReport(mpHeader, listOfContainer);
318 
321 
322  if (mpBody)
323  success &= compileChildReport(mpBody, listOfContainer);
324 
327 
328  if (mpFooter)
329  success &= compileChildReport(mpFooter, listOfContainer);
330 
331  mState = Compiled;
332 
333  return success;
334 }
State mState
Definition: CReport.h:76
std::vector< CCopasiObject * > mHeaderObjectList
Definition: CReport.h:70
CReport * mpFooter
Definition: CReport.h:74
std::vector< CCopasiObject * > mFooterObjectList
Definition: CReport.h:68
std::vector< CRegisteredObjectName > * getFooterAddr()
bool compileChildReport(CReport *pReport, std::vector< CCopasiContainer * > listOfContainer)
Definition: CReport.cpp:429
std::vector< CCopasiObject * > mBodyObjectList
Definition: CReport.h:69
std::set< const CCopasiObject * > mObjects
CReportDefinition * mpReportDef
Definition: CReport.h:63
std::vector< CRegisteredObjectName > * getBodyAddr()
CReport * mpBody
Definition: CReport.h:73
CReport * mpHeader
Definition: CReport.h:72
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
std::vector< CRegisteredObjectName > * getHeaderAddr()
bool preCompileTable(const std::vector< CCopasiContainer * > &listOfContainer=CCopasiContainer::EmptyList)
void generateObjectsFromName(const std::vector< CCopasiContainer * > *pListOfContainer, std::vector< CCopasiObject * > &objectList, CReport *&pReport, const std::vector< CRegisteredObjectName > *nameVector)
Definition: CReport.cpp:395
bool CReport::compileChildReport ( CReport pReport,
std::vector< CCopasiContainer * >  listOfContainer 
)
private

Compile the child report

Parameters
CReport* pReport
std::vector<CCopasiContainer * > listOfContainer
Returns
bool success

Definition at line 429 of file CReport.cpp.

References compile(), COutputInterface::mObjects, mpDataModel, mpOstream, and open().

Referenced by compile().

430 {
431  pReport->open(mpDataModel, mpOstream);
432  bool success = pReport->compile(listOfContainer, mpDataModel);
433 
434  const std::set< const CCopasiObject * > & Objects = pReport->COutputInterface::getObjects();
435  std::set< const CCopasiObject * >::const_iterator it = Objects.begin();
436  std::set< const CCopasiObject * >::const_iterator end = Objects.end();
437 
438  for (; it != end; ++it)
439  COutputInterface::mObjects.insert(*it);
440 
441  return success;
442 }
virtual bool compile(std::vector< CCopasiContainer * > listOfContainer, const CCopasiDataModel *pDataModel)
Definition: CReport.cpp:299
std::ostream * mpOstream
Definition: CReport.h:60
std::set< const CCopasiObject * > mObjects
std::ostream * open(const CCopasiDataModel *pDataModel, std::ostream *pOstream=NULL)
Definition: CReport.cpp:336
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
const bool & CReport::confirmOverwrite ( ) const

Returns whether a confirmation should be issued when overwriting a report

Returns
const bool & confirmOverwite

Definition at line 101 of file CReport.cpp.

References mConfirmOverwrite.

Referenced by TaskWidget::commonBeforeRunTask(), CQReportDefinitionSelect::loadReportDefinitionVector(), CCopasiXML::saveTaskList(), and setConfirmOverwrite().

102 {return mConfirmOverwrite;}
bool mConfirmOverwrite
Definition: CReport.h:66
void CReport::finish ( )
virtual

Finish the output

Reimplemented from COutputInterface.

Definition at line 132 of file CReport.cpp.

References FooterFooter, Invalid, mpBody, mpFooter, mpHeader, mState, pdelete, and printFooter().

Referenced by cleanup().

133 {
135 
136  printFooter();
137 
138  pdelete(mpHeader);
139  pdelete(mpBody);
140  pdelete(mpFooter);
141 
142  mState = Invalid;
143 }
#define pdelete(p)
Definition: copasi.h:215
void printFooter()
Definition: CReport.cpp:247
State mState
Definition: CReport.h:76
CReport * mpFooter
Definition: CReport.h:74
CReport * mpBody
Definition: CReport.h:73
CReport * mpHeader
Definition: CReport.h:72
void CReport::generateObjectsFromName ( const std::vector< CCopasiContainer * > *  pListOfContainer,
std::vector< CCopasiObject * > &  objectList,
CReport *&  pReport,
const std::vector< CRegisteredObjectName > *  nameVector 
)
private

transfer every individual object list from name vector

Definition at line 395 of file CReport.cpp.

References C_INT32, CReport(), MCCopasiTask, COutputInterface::mObjects, mpDataModel, CCopasiDataModel::ObjectFromName(), setReportDefinition(), and CCopasiMessage::WARNING.

Referenced by compile().

399 {
400  objectList.clear();
401 
402  unsigned C_INT32 i;
403  CCopasiObject * pSelected;
404  CReportDefinition * pReportDefinition;
405 
406  for (i = 0; i < nameVector->size(); i++)
407  {
408  pSelected = mpDataModel->ObjectFromName(*pListOfContainer, (*nameVector)[i]);
409 
410  if (!pSelected)
411  {
412  CCopasiMessage(CCopasiMessage::WARNING, MCCopasiTask + 6, (*nameVector)[i].c_str());
413  continue;
414  }
415 
416  if (!i && (pReportDefinition = dynamic_cast< CReportDefinition * >(pSelected)) != NULL)
417  {
418  pReport = new CReport();
419  pReport->setReportDefinition(pReportDefinition);
420 
421  return;
422  }
423 
424  COutputInterface::mObjects.insert(pSelected);
425  objectList.push_back(pSelected);
426  }
427 }
#define C_INT32
Definition: copasi.h:90
#define MCCopasiTask
std::set< const CCopasiObject * > mObjects
CReport()
Definition: CReport.cpp:34
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
void setReportDefinition(CReportDefinition *reportDef)
Definition: CReport.cpp:86
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
CReportDefinition * CReport::getReportDefinition ( )

returns the reference of the Report Tag

Definition at line 83 of file CReport.cpp.

References mpReportDef.

Referenced by CCopasiDataModel::addDefaultReports(), CSEDMLExporter::createDataGenerators(), CQReportDefinitionSelect::loadReportDefinitionVector(), and CCopasiXML::saveTaskList().

84 {return mpReportDef;}
CReportDefinition * mpReportDef
Definition: CReport.h:63
std::ostream * CReport::getStream ( ) const

Retrieve a pointer to the ostream

Returns
std::ostream * pOstream

Definition at line 392 of file CReport.cpp.

References mpOstream.

Referenced by CLNATask::initialize(), CScanTask::initialize(), COptProblem::initialize(), and CMCATask::initialize().

392 {return mpOstream;}
std::ostream * mpOstream
Definition: CReport.h:60
const std::string & CReport::getTarget ( ) const

returns the target of the Report Tag

Definition at line 89 of file CReport.cpp.

References mTarget.

Referenced by TaskWidget::commonBeforeRunTask(), CSEDMLExporter::createDataGenerators(), CCopasiTask::initialize(), CQReportDefinitionSelect::loadReportDefinitionVector(), and CCopasiXML::saveTaskList().

90 {return mTarget;}
std::string mTarget
Definition: CReport.h:64
std::ostream * CReport::open ( const CCopasiDataModel pDataModel,
std::ostream *  pOstream = NULL 
)

Open the defined target stream or use the given argument

Parameters
constCCopasiDataModel * pDataModel,
std::ostream* pOstream (default: NULL)
Returns
std::ostream * mpOstream

Definition at line 336 of file CReport.cpp.

References CCopasiMessage::ERROR, CDirEntry::fileName(), CLocaleString::fromUtf8(), CCopasiDataModel::getFileName(), CReportDefinition::getPrecision(), CDirEntry::isRelativePath(), CDirEntry::makePathAbsolute(), mAppend, MCDirEntry, mpDataModel, mpOstream, mpReportDef, mStreamOwner, mTarget, and pdelete.

Referenced by compileChildReport(), CScanTask::initialize(), and CCopasiTask::initialize().

338 {
339  mpDataModel = pDataModel;
340  assert(mpDataModel != NULL);
341 
342  // If an ostream is given and it is the currently assigned one
343  // we do nothing.
344  if (pOstream != NULL &&
345  pOstream == mpOstream)
346  return mpOstream;
347 
348  if (mStreamOwner)
350 
351  mpOstream = pOstream;
352 
353  if (pOstream)
354  {
355  mStreamOwner = false;
356  }
357  else if (mTarget != "" && mpReportDef != NULL)
358  {
362 
363  mpOstream = new std::ofstream;
364  mStreamOwner = true;
365 
366  if (mAppend)
367  {
368  ((std::ofstream *) mpOstream)->
369  open(CLocaleString::fromUtf8(mTarget).c_str(), std::ios_base::out | std::ios_base::app);
370  }
371  else
372  {
373  ((std::ofstream *) mpOstream)->
374  open(CLocaleString::fromUtf8(mTarget).c_str(), std::ios_base::out);
375  }
376 
377  if (!((std::ofstream *) mpOstream)->is_open())
378  {
380  pdelete(mpOstream);
381  }
382 
383  if (mpOstream)
384  {
385  mpOstream->precision(mpReportDef->getPrecision());
386  }
387  }
388 
389  return mpOstream;
390 }
#define pdelete(p)
Definition: copasi.h:215
static bool isRelativePath(const std::string &path)
Definition: CDirEntry.cpp:414
static std::string fileName(const std::string &path)
Definition: CDirEntry.cpp:119
std::ostream * mpOstream
Definition: CReport.h:60
const unsigned C_INT32 & getPrecision() const
const std::string & getFileName() const
std::string mTarget
Definition: CReport.h:64
#define MCDirEntry
CReportDefinition * mpReportDef
Definition: CReport.h:63
bool mStreamOwner
Definition: CReport.h:61
std::ostream * open(const CCopasiDataModel *pDataModel, std::ostream *pOstream=NULL)
Definition: CReport.cpp:336
static CLocaleString fromUtf8(const std::string &utf8)
const CCopasiDataModel * mpDataModel
Definition: CReport.h:59
static bool makePathAbsolute(std::string &relativePath, const std::string &absoluteTo)
Definition: CDirEntry.cpp:481
bool mAppend
Definition: CReport.h:65
void CReport::output ( const Activity activity)
virtual

Perform an output event for the current activity

Parameters
constActivity & activity

Reimplemented from COutputInterface.

Definition at line 107 of file CReport.cpp.

References COutputInterface::AFTER, COutputInterface::BEFORE, COutputInterface::DURING, printBody(), printFooter(), and printHeader().

Referenced by CSensTask::process().

108 {
109  switch (activity)
110  {
112  printHeader();
113  break;
114 
116  printBody();
117  break;
118 
120  printFooter();
121  break;
122  }
123 }
void printFooter()
Definition: CReport.cpp:247
void printBody()
Definition: CReport.cpp:196
void printHeader()
Definition: CReport.cpp:153
void CReport::printBody ( )
private

to print body

Definition at line 196 of file CReport.cpp.

References BodyBody, BodyFooter, BodyHeader, HeaderFooter, mBodyObjectList, mpBody, mpHeader, mpOstream, mState, printBody(), printFooter(), and printHeader().

Referenced by output(), printBody(), printFooter(), and printHeader().

197 {
198  if (!mpOstream) return;
199 
200  // Close the header part
201  if (mState < HeaderFooter)
202  {
204 
205  if (mpHeader) mpHeader->printFooter();
206  }
207 
208  if (mpBody)
209  switch (mState)
210  {
211  case HeaderFooter:
212  mpBody->printHeader();
213  mState = BodyHeader;
214  return;
215 
216  case BodyHeader:
217  mpBody->printBody();
218  mState = BodyBody;
219  return;
220 
221  case BodyBody:
222  mpBody->printBody();
223  return;
224 
225  case BodyFooter:
226  mpBody->printFooter();
227  return;
228 
229  default:
230  return;
231  }
232 
233  if (mState == BodyFooter) return;
234 
235  mState = BodyBody;
236 
237  std::vector< CCopasiObject * >::iterator it = mBodyObjectList.begin();
238  std::vector< CCopasiObject * >::iterator end = mBodyObjectList.end();
239 
240  if (it == end) return;
241 
242  for (; it != end; ++it)(*it)->print(mpOstream);
243 
244  (*mpOstream) << std::endl;
245 }
void printFooter()
Definition: CReport.cpp:247
State mState
Definition: CReport.h:76
std::ostream * mpOstream
Definition: CReport.h:60
void printBody()
Definition: CReport.cpp:196
std::vector< CCopasiObject * > mBodyObjectList
Definition: CReport.h:69
CReport * mpBody
Definition: CReport.h:73
CReport * mpHeader
Definition: CReport.h:72
void printHeader()
Definition: CReport.cpp:153
void CReport::printFooter ( )
private

to print footer

Definition at line 247 of file CReport.cpp.

References BodyFooter, FooterBody, FooterFooter, FooterHeader, mFooterObjectList, mpBody, mpFooter, mpOstream, mState, printBody(), printFooter(), and printHeader().

Referenced by finish(), output(), printBody(), printFooter(), and printHeader().

248 {
249  if (!mpOstream) return;
250 
251  // Close the body part
252  if (mState < BodyFooter)
253  {
254  mState = BodyFooter;
255 
256  if (mpBody) mpBody->printFooter();
257  }
258 
259  if (mpFooter)
260  switch (mState)
261  {
262  case BodyFooter:
265  return;
266 
267  case FooterHeader:
268  mpFooter->printBody();
269  mState = FooterBody;
270  return;
271 
272  case FooterBody:
273  mpFooter->printBody();
274  return;
275 
276  case FooterFooter:
278  return;
279 
280  default:
281  return;
282  }
283 
284  if (mState != FooterFooter) return;
285 
286  std::vector< CCopasiObject * >::iterator it = mFooterObjectList.begin();
287  std::vector< CCopasiObject * >::iterator end = mFooterObjectList.end();
288 
289  if (it == end) return;
290 
291  for (; it != end; ++it)(*it)->print(mpOstream);
292 
293  (*mpOstream) << std::endl;
294 }
void printFooter()
Definition: CReport.cpp:247
State mState
Definition: CReport.h:76
std::ostream * mpOstream
Definition: CReport.h:60
void printBody()
Definition: CReport.cpp:196
CReport * mpFooter
Definition: CReport.h:74
std::vector< CCopasiObject * > mFooterObjectList
Definition: CReport.h:68
CReport * mpBody
Definition: CReport.h:73
void printHeader()
Definition: CReport.cpp:153
void CReport::printHeader ( )
private

to print header

Definition at line 153 of file CReport.cpp.

References Compiled, HeaderBody, HeaderFooter, HeaderHeader, mHeaderObjectList, mpHeader, mpOstream, mState, printBody(), printFooter(), and printHeader().

Referenced by output(), printBody(), printFooter(), and printHeader().

154 {
155  if (!mpOstream) return;
156 
157  if (mpHeader)
158  switch (mState)
159  {
160  case Compiled:
163  return;
164 
165  case HeaderHeader:
166  mpHeader->printBody();
167  mState = HeaderBody;
168  return;
169 
170  case HeaderBody:
171  mpHeader->printBody();
172  return;
173 
174  case HeaderFooter:
176  return;
177 
178  default:
179  return;
180  }
181 
182  if (mState == HeaderFooter) return;
183 
185 
186  std::vector< CCopasiObject * >::iterator it = mHeaderObjectList.begin();
187  std::vector< CCopasiObject * >::iterator end = mHeaderObjectList.end();
188 
189  if (it == end) return;
190 
191  for (; it != end; ++it)(*it)->print(mpOstream);
192 
193  (*mpOstream) << std::endl;
194 }
void printFooter()
Definition: CReport.cpp:247
State mState
Definition: CReport.h:76
std::ostream * mpOstream
Definition: CReport.h:60
void printBody()
Definition: CReport.cpp:196
std::vector< CCopasiObject * > mHeaderObjectList
Definition: CReport.h:70
CReport * mpHeader
Definition: CReport.h:72
void printHeader()
Definition: CReport.cpp:153
void CReport::separate ( const Activity )
virtual

Introduce an additional separator into the output

Parameters
constActivity & activity

Reimplemented from COutputInterface.

Definition at line 125 of file CReport.cpp.

References mpOstream.

126 {
127  if (!mpOstream) return;
128 
129  (*mpOstream) << std::endl;
130 }
std::ostream * mpOstream
Definition: CReport.h:60
void CReport::setAppend ( const bool &  append)

sets the append attribute if the report tag

Parameters
constbool & append

Definition at line 98 of file CReport.cpp.

References append(), and mAppend.

Referenced by CQReportDefinitionSelect::accept(), SEDMLImporter::importTasks(), CQReportDefinitionSelect::loadReportDefinitionVector(), and CCopasiXMLParser::ReportInstanceElement::start().

99 {mAppend = append;}
const bool & append() const
Definition: CReport.cpp:95
bool mAppend
Definition: CReport.h:65
void CReport::setConfirmOverwrite ( const bool &  confirmOverwrite)

sets the confirmOverwrite attribute if the report tag

Parameters
constbool & confirmOverwrite

Definition at line 104 of file CReport.cpp.

References confirmOverwrite(), and mConfirmOverwrite.

Referenced by CQReportDefinitionSelect::accept(), SEDMLImporter::importTasks(), CQReportDefinitionSelect::loadReportDefinitionVector(), and CCopasiXMLParser::ReportInstanceElement::start().

const bool & confirmOverwrite() const
Definition: CReport.cpp:101
bool mConfirmOverwrite
Definition: CReport.h:66
void CReport::setReportDefinition ( CReportDefinition reportDef)
void CReport::setTarget ( const std::string &  target)

Member Data Documentation

bool CReport::mAppend
private

Definition at line 65 of file CReport.h.

Referenced by append(), open(), and setAppend().

std::vector< CCopasiObject * > CReport::mBodyObjectList
private

Definition at line 69 of file CReport.h.

Referenced by cleanup(), compile(), and printBody().

bool CReport::mConfirmOverwrite
private

Definition at line 66 of file CReport.h.

Referenced by confirmOverwrite(), and setConfirmOverwrite().

std::vector< CCopasiObject * > CReport::mFooterObjectList
private

Definition at line 68 of file CReport.h.

Referenced by cleanup(), compile(), and printFooter().

std::vector< CCopasiObject * > CReport::mHeaderObjectList
private

Definition at line 70 of file CReport.h.

Referenced by cleanup(), compile(), and printHeader().

CReport* CReport::mpBody
private

Definition at line 73 of file CReport.h.

Referenced by compile(), finish(), printBody(), and printFooter().

const CCopasiDataModel* CReport::mpDataModel
private

Definition at line 59 of file CReport.h.

Referenced by compile(), compileChildReport(), generateObjectsFromName(), and open().

CReport* CReport::mpFooter
private

Definition at line 74 of file CReport.h.

Referenced by compile(), finish(), and printFooter().

CReport* CReport::mpHeader
private

Definition at line 72 of file CReport.h.

Referenced by compile(), finish(), printBody(), and printHeader().

std::ostream* CReport::mpOstream
private
CReportDefinition* CReport::mpReportDef
private

Definition at line 63 of file CReport.h.

Referenced by compile(), getReportDefinition(), open(), and setReportDefinition().

State CReport::mState
private

Definition at line 76 of file CReport.h.

Referenced by compile(), finish(), printBody(), printFooter(), and printHeader().

bool CReport::mStreamOwner
private

Definition at line 61 of file CReport.h.

Referenced by close(), and open().

std::string CReport::mTarget
private

Definition at line 64 of file CReport.h.

Referenced by getTarget(), open(), and setTarget().


The documentation for this class was generated from the following files: