COPASI API  4.40.278
CReport Class Reference

#include <CReport.h>

Inheritance diagram for CReport:
[legend]

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 CReportDefinitiongetReportDefinition () 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::ObjectSetgetObjects () 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
 
CReportmpBody
 
const CDataModelmpDataModel
 
CReportmpFooter
 
CReportmpHeader
 
std::ostream * mpOstream
 
const CReportDefinitionmpReportDef
 
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
 

Member Enumeration Documentation

◆ State

enum CReport::State
private

Enumeration of the report states.

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

Constructor & Destructor Documentation

◆ CReport() [1/2]

CReport::CReport ( )

Default constructor.

Referenced by generateObjectsFromName().

◆ CReport() [2/2]

CReport::CReport ( const CReport src)

Copy constructor.

Parameters
constCReport & src

◆ ~CReport()

CReport::~CReport ( )

Destructor.

References cleanup().

Member Function Documentation

◆ append()

const bool & CReport::append ( ) const

Returns whether the Report Tag is appended or not

Returns
const bool & append

References mAppend.

Referenced by CCopasiTask::createUndoData(), CCopasiXML::saveTaskList(), setAppend(), and CCopasiTask::toData().

◆ cleanup()

void CReport::cleanup ( )

cleanup

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

Referenced by ~CReport().

◆ close()

void CReport::close ( )
virtual

Close the stream if applicable

Reimplemented from COutputInterface.

References mpOstream, mStreamOwner, and pdelete.

Referenced by cleanup().

◆ compile()

◆ compileChildReport()

bool CReport::compileChildReport ( CReport pReport,
CObjectInterface::ContainerList  listOfContainer 
)
private

Compile the child report

Parameters
CReport* pReport
CObjectInterface::ContainerListlistOfContainer
Returns
bool success

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

Referenced by compile().

◆ confirmOverwrite()

const bool & CReport::confirmOverwrite ( ) const

Returns whether a confirmation should be issued when overwriting a report

Returns
const bool & confirmOverwite

References mConfirmOverwrite.

Referenced by CCopasiTask::createUndoData(), CCopasiXML::saveTaskList(), setConfirmOverwrite(), and CCopasiTask::toData().

◆ finish()

void CReport::finish ( )
virtual

Finish the output

Implements COutputInterface.

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

Referenced by cleanup().

◆ generateObjectsFromName()

void CReport::generateObjectsFromName ( const CObjectInterface::ContainerList listOfContainer,
std::vector< CObjectInterface * > &  objectList,
CReport *&  pReport,
const std::vector< CRegisteredCommonName > *  nameVector 
)
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().

◆ getReportDefinition()

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().

◆ getStream()

std::ostream * CReport::getStream ( ) const

Retrieve a pointer to the ostream

Returns
std::ostream * pOstream

References mpOstream.

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

◆ getTarget()

const std::string & CReport::getTarget ( ) const

◆ open()

std::ostream * CReport::open ( const CDataModel pDataModel,
std::ostream *  pOstream = NULL 
)

Open the defined target stream or use the given argument

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

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().

◆ output()

void CReport::output ( const Activity activity)
virtual

Perform an output event for the current activity

Parameters
constActivity & activity

Implements COutputInterface.

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

◆ printBody()

void CReport::printBody ( )
private

◆ printFooter()

void CReport::printFooter ( )
private

◆ printHeader()

void CReport::printHeader ( )
private

◆ separate()

void CReport::separate ( const Activity )
virtual

Introduce an additional separator into the output

Parameters
constActivity & activity

Implements COutputInterface.

References mpOstream.

◆ setAppend()

void CReport::setAppend ( const bool &  append)

sets the append attribute if the report tag

Parameters
constbool & append

References append(), and mAppend.

Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().

◆ setConfirmOverwrite()

void CReport::setConfirmOverwrite ( const bool &  confirmOverwrite)

sets the confirmOverwrite attribute if the report tag

Parameters
constbool & confirmOverwrite

References confirmOverwrite(), and mConfirmOverwrite.

Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().

◆ setReportDefinition()

void CReport::setReportDefinition ( const CReportDefinition reportDef)

sets the reference to the report

Parameters
constCReportDefinition *reportDef

References mpReportDef.

Referenced by CDataModel::addDefaultReports(), CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and generateObjectsFromName().

◆ setTarget()

void CReport::setTarget ( const std::string &  target)

sets the reference to the report

Parameters
conststd::string & target

References mTarget.

Referenced by CCopasiTask::applyData(), SEDMLImporter::assignReportDefinitions(), and ReportTargetHandler::processStart().

Member Data Documentation

◆ mAppend

bool CReport::mAppend
private

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

◆ mBodyObjectList

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

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

◆ mConfirmOverwrite

bool CReport::mConfirmOverwrite
private

◆ mFooterObjectList

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

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

◆ mHeaderObjectList

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

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

◆ mpBody

CReport* CReport::mpBody
private

◆ mpDataModel

const CDataModel* CReport::mpDataModel
private

Referenced by compileChildReport(), and open().

◆ mpFooter

CReport* CReport::mpFooter
private

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

◆ mpHeader

CReport* CReport::mpHeader
private

◆ mpOstream

std::ostream* CReport::mpOstream
private

◆ mpReportDef

const CReportDefinition* CReport::mpReportDef
private

◆ mState

State CReport::mState
private

◆ mStreamOwner

bool CReport::mStreamOwner
private

Referenced by close(), and open().

◆ mTarget

std::string CReport::mTarget
private

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


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