COPASI API  4.40.278
CExperimentFileInfo Class Reference

#include <CExperimentFileInfo.h>

Classes

class  CExperimentInfo
 

Public Member Functions

bool adjustForEmptyLines (size_t &First, size_t &Last)
 
 CExperimentFileInfo (CExperimentSet &set)
 
size_t countLines ()
 
CExperimentgetExperiment (const std::string &name)
 
std::vector< std::string > getExperimentNames () const
 
const std::string & getFileName () const
 
bool getFirstUnusedSection (size_t &First, size_t &Last)
 
size_t getInterruption (size_t first, size_t last) const
 
bool getNextUnusedSection (size_t &First, size_t &Last)
 
void removeInvalidExperiments ()
 
void removeLastExperiments (size_t start)
 
bool setFileName (const std::string &fileName)
 
bool sync ()
 
bool validate () const
 
bool validateFirst (const size_t &index, const size_t &value)
 
bool validateHeader (const size_t &index, const size_t &value)
 
bool validateLast (const size_t &index, const size_t &value)
 
 ~CExperimentFileInfo ()
 

Private Member Functions

 CExperimentFileInfo ()
 

Private Attributes

std::vector< size_t > mEmptyLines
 
std::string mFileName
 
size_t mLines
 
std::vector< CExperimentInfo * > mList
 
CExperimentSetmpSet
 
size_t mUsedEnd
 

Constructor & Destructor Documentation

◆ CExperimentFileInfo() [1/2]

CExperimentFileInfo::CExperimentFileInfo ( )
private

◆ CExperimentFileInfo() [2/2]

CExperimentFileInfo::CExperimentFileInfo ( CExperimentSet set)

◆ ~CExperimentFileInfo()

CExperimentFileInfo::~CExperimentFileInfo ( )

References mList, and pdelete.

Member Function Documentation

◆ adjustForEmptyLines()

bool CExperimentFileInfo::adjustForEmptyLines ( size_t &  First,
size_t &  Last 
)

◆ countLines()

size_t CExperimentFileInfo::countLines ( )

counts the lines in the file and initializes the empty lines

References CLocaleString::fromUtf8(), mEmptyLines, mFileName, and mLines.

Referenced by setFileName().

◆ getExperiment()

CExperiment * CExperimentFileInfo::getExperiment ( const std::string &  name)
Parameters
namethe object name of an experiment
Returns
the experiment if found or NULL

References mList.

◆ getExperimentNames()

std::vector< std::string > CExperimentFileInfo::getExperimentNames ( ) const
Returns
object names of all experiments

References mList.

◆ getFileName()

const std::string & CExperimentFileInfo::getFileName ( ) const
Returns
the filename

References mFileName.

◆ getFirstUnusedSection()

bool CExperimentFileInfo::getFirstUnusedSection ( size_t &  First,
size_t &  Last 
)

References getNextUnusedSection(), and mUsedEnd.

◆ getInterruption()

size_t CExperimentFileInfo::getInterruption ( size_t  first,
size_t  last 
) const
Returns
the first empty line within the given interval.

References C_INVALID_INDEX, and mEmptyLines.

Referenced by removeInvalidExperiments().

◆ getNextUnusedSection()

bool CExperimentFileInfo::getNextUnusedSection ( size_t &  First,
size_t &  Last 
)

◆ removeInvalidExperiments()

void CExperimentFileInfo::removeInvalidExperiments ( )

go through the experiments and remove all that don't match

References C_INVALID_INDEX, getInterruption(), mLines, mList, and removeLastExperiments().

◆ removeLastExperiments()

void CExperimentFileInfo::removeLastExperiments ( size_t  start)

Removes the last experiments

Parameters
startthe start from where on all experiments will be deleted

References mList, mpSet, pdelete, and CExperimentSet::removeExperiment().

Referenced by removeInvalidExperiments().

◆ setFileName()

bool CExperimentFileInfo::setFileName ( const std::string &  fileName)

References countLines(), mFileName, and sync().

◆ sync()

◆ validate()

bool CExperimentFileInfo::validate ( ) const

References mLines, and mList.

Referenced by sync(), validateFirst(), and validateLast().

◆ validateFirst()

bool CExperimentFileInfo::validateFirst ( const size_t &  index,
const size_t &  value 
)

References mLines, mList, and validate().

◆ validateHeader()

bool CExperimentFileInfo::validateHeader ( const size_t &  index,
const size_t &  value 
)

References mLines, and mList.

◆ validateLast()

bool CExperimentFileInfo::validateLast ( const size_t &  index,
const size_t &  value 
)

References mLines, mList, and validate().

Member Data Documentation

◆ mEmptyLines

std::vector< size_t > CExperimentFileInfo::mEmptyLines
private

vector of empty lines

Referenced by adjustForEmptyLines(), countLines(), and getInterruption().

◆ mFileName

std::string CExperimentFileInfo::mFileName
private

the filename

Referenced by countLines(), getFileName(), setFileName(), and sync().

◆ mLines

size_t CExperimentFileInfo::mLines
private

◆ mList

std::vector< CExperimentInfo * > CExperimentFileInfo::mList
private

◆ mpSet

CExperimentSet* CExperimentFileInfo::mpSet
private

the experiment set

Referenced by removeLastExperiments(), and sync().

◆ mUsedEnd

size_t CExperimentFileInfo::mUsedEnd
private

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