COPASI API
4.40.278
|
#include <CReport.h>
Public Member Functions | |
const bool & | append () const |
void | cleanup () |
virtual void | close () |
virtual bool | compile (CObjectInterface::ContainerList listOfContainer) |
const bool & | confirmOverwrite () const |
CReport () | |
CReport (const CReport &src) | |
virtual void | finish () |
const CReportDefinition * | getReportDefinition () const |
std::ostream * | getStream () const |
const std::string & | getTarget () const |
std::ostream * | open (const CDataModel *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 (const CReportDefinition *reportDef) |
void | setTarget (const std::string &target) |
~CReport () | |
Public Member Functions inherited from COutputInterface | |
COutputInterface () | |
COutputInterface (const COutputInterface &src) | |
virtual const CObjectInterface::ObjectSet & | 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, CObjectInterface::ContainerList listOfContainer) |
void | generateObjectsFromName (const CObjectInterface::ContainerList &listOfContainer, std::vector< CObjectInterface * > &objectList, CReport *&pReport, const std::vector< CRegisteredCommonName > *nameVector) |
void | printBody () |
void | printFooter () |
void | printHeader () |
Private Attributes | |
bool | mAppend |
std::vector< CObjectInterface * > | mBodyObjectList |
bool | mConfirmOverwrite |
std::vector< CObjectInterface * > | mFooterObjectList |
std::vector< CObjectInterface * > | mHeaderObjectList |
CReport * | mpBody |
const CDataModel * | mpDataModel |
CReport * | mpFooter |
CReport * | mpHeader |
std::ostream * | mpOstream |
const CReportDefinition * | mpReportDef |
State | mState |
bool | mStreamOwner |
std::string | mTarget |
Additional Inherited Members | |
Public Types inherited from COutputInterface | |
enum | Activity { BEFORE = 0x01 , DURING = 0x02 , AFTER = 0x04 , MONITORING = 0x08 } |
Protected Attributes inherited from COutputInterface | |
CObjectInterface::ObjectSet | mObjects |
|
private |
CReport::CReport | ( | ) |
Default constructor.
Referenced by generateObjectsFromName().
CReport::~CReport | ( | ) |
Destructor.
References cleanup().
const bool & CReport::append | ( | ) | const |
Returns whether the Report Tag is appended or not
References mAppend.
Referenced by CCopasiTask::createUndoData(), CCopasiXML::saveTaskList(), setAppend(), and CCopasiTask::toData().
void CReport::cleanup | ( | ) |
cleanup
References close(), finish(), mBodyObjectList, mFooterObjectList, and mHeaderObjectList.
Referenced by ~CReport().
|
virtual |
Close the stream if applicable
Reimplemented from COutputInterface.
References mpOstream, mStreamOwner, and pdelete.
Referenced by cleanup().
|
virtual |
compile the object list from name vector
CObjectInterface::ContainerList | listOfContainer |
const | CDataModel* pDataModel |
Implements COutputInterface.
References compileChildReport(), Compiled, generateObjectsFromName(), CReportDefinition::getBodyAddr(), CReportDefinition::getFooterAddr(), CReportDefinition::getHeaderAddr(), CReportDefinition::isTable(), mBodyObjectList, mFooterObjectList, mHeaderObjectList, COutputInterface::mObjects, mpBody, mpFooter, mpHeader, mpReportDef, and mState.
Referenced by compileChildReport().
|
private |
Compile the child report
CReport | * pReport |
CObjectInterface::ContainerList | listOfContainer |
References compile(), COutputInterface::mObjects, mpDataModel, mpOstream, and open().
Referenced by compile().
const bool & CReport::confirmOverwrite | ( | ) | const |
Returns whether a confirmation should be issued when overwriting a report
References mConfirmOverwrite.
Referenced by CCopasiTask::createUndoData(), CCopasiXML::saveTaskList(), setConfirmOverwrite(), and CCopasiTask::toData().
|
virtual |
Finish the output
Implements COutputInterface.
References FooterFooter, Invalid, mpBody, mpFooter, mpHeader, mState, pdelete, and printFooter().
Referenced by cleanup().
|
private |
transfer every individual object list from name vector
References C_INT32, CReport(), CObjectInterface::GetObjectFromCN(), MCCopasiTask, COutputInterface::mObjects, setReportDefinition(), and CCopasiMessage::WARNING.
Referenced by compile().
const CReportDefinition * CReport::getReportDefinition | ( | ) | const |
returns the reference of the Report Tag returns the reference of the Report Tag
References mpReportDef.
Referenced by CDataModel::addDefaultReports(), CSEDMLExporter::createDataGenerators(), CCopasiTask::createUndoData(), CCopasiXML::saveTaskList(), and CCopasiTask::toData().
std::ostream * CReport::getStream | ( | ) | const |
Retrieve a pointer to the ostream
References mpOstream.
Referenced by COptProblem::initialize(), CScanTask::initialize(), CLNATask::initialize(), and CMCATask::initialize().
const std::string & CReport::getTarget | ( | ) | const |
returns the target of the Report Tag
References mTarget.
Referenced by CSEDMLExporter::createDataGenerators(), CCopasiTask::createUndoData(), CCopasiTask::initialize(), CCopasiXML::saveTaskList(), and CCopasiTask::toData().
std::ostream * CReport::open | ( | const CDataModel * | pDataModel, |
std::ostream * | pOstream = NULL |
||
) |
Open the defined target stream or use the given argument
const | CDataModel * pDataModel, |
std::ostream | * pOstream (default: NULL) |
References CCopasiMessage::ERROR, CDirEntry::fileName(), CLocaleString::fromUtf8(), CReportDefinition::getPrecision(), CDataModel::getReferenceDirectory(), CDirEntry::isRelativePath(), CDirEntry::makePathAbsolute(), mAppend, MCDirEntry, mpDataModel, mpOstream, mpReportDef, mStreamOwner, mTarget, and pdelete.
Referenced by compileChildReport(), CScanTask::initialize(), and CCopasiTask::initialize().
|
virtual |
Perform an output event for the current activity
const | Activity & activity |
Implements COutputInterface.
References COutputInterface::AFTER, COutputInterface::BEFORE, COutputInterface::DURING, printBody(), printFooter(), and printHeader().
|
private |
to print body
References BodyBody, BodyFooter, BodyHeader, HeaderFooter, mBodyObjectList, mpBody, mpHeader, mpOstream, mState, printBody(), printFooter(), and printHeader().
Referenced by output(), printBody(), printFooter(), and printHeader().
|
private |
to print footer
References BodyFooter, FooterBody, FooterFooter, FooterHeader, mFooterObjectList, mpBody, mpFooter, mpOstream, mState, printBody(), printFooter(), and printHeader().
Referenced by finish(), output(), printBody(), printFooter(), and printHeader().
|
private |
to print header
References Compiled, HeaderBody, HeaderFooter, HeaderHeader, mHeaderObjectList, mpHeader, mpOstream, mState, printBody(), printFooter(), and printHeader().
Referenced by output(), printBody(), printFooter(), and printHeader().
|
virtual |
Introduce an additional separator into the output
const | Activity & activity |
Implements COutputInterface.
References mpOstream.
void CReport::setAppend | ( | const bool & | append | ) |
sets the append attribute if the report tag
const | bool & append |
References append(), and mAppend.
Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().
void CReport::setConfirmOverwrite | ( | const bool & | confirmOverwrite | ) |
sets the confirmOverwrite attribute if the report tag
const | bool & confirmOverwrite |
References confirmOverwrite(), and mConfirmOverwrite.
Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().
void CReport::setReportDefinition | ( | const CReportDefinition * | reportDef | ) |
sets the reference to the report
const | CReportDefinition *reportDef |
References mpReportDef.
Referenced by CDataModel::addDefaultReports(), CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and generateObjectsFromName().
void CReport::setTarget | ( | const std::string & | target | ) |
sets the reference to the report
const | std::string & target |
References mTarget.
Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().
|
private |
Referenced by append(), open(), and setAppend().
|
private |
Referenced by cleanup(), compile(), and printBody().
|
private |
Referenced by confirmOverwrite(), and setConfirmOverwrite().
|
private |
Referenced by cleanup(), compile(), and printFooter().
|
private |
Referenced by cleanup(), compile(), and printHeader().
|
private |
Referenced by compile(), finish(), printBody(), and printFooter().
|
private |
Referenced by compileChildReport(), and open().
|
private |
Referenced by compile(), finish(), and printFooter().
|
private |
Referenced by compile(), finish(), printBody(), and printHeader().
|
private |
Referenced by close(), compileChildReport(), getStream(), open(), printBody(), printFooter(), printHeader(), and separate().
|
private |
Referenced by compile(), getReportDefinition(), open(), and setReportDefinition().
|
private |
Referenced by compile(), finish(), printBody(), printFooter(), and printHeader().
|
private |
Referenced by getTarget(), open(), and setTarget().