CFEL - ASG Software Suite  2.5.0
CASS
Static Public Member Functions | List of all members
cass::AlphaCounter Class Reference

an alphabetical counter extension More...

#include <convenience_functions.h>

Static Public Member Functions

static std::string intializeDir (const std::string &fname)
 initialize the directory More...
 
static std::string intializeFile (const std::string &fname)
 initialize the filename More...
 
static std::string removeAlphaSubdir (const std::string &fname)
 remove the alpha counter subdir from filename More...
 
static std::string increaseDirCounter (const std::string &fname)
 increase the alpha counter More...
 
static std::string increaseFileCounter (const std::string &fname)
 increase the alpha counter in the file name More...
 

Detailed Description

an alphabetical counter extension

changes dirs by appending a subdir with an alphabetically increasing counter

Author
Lutz Foucar

Definition at line 163 of file convenience_functions.h.

Member Function Documentation

static std::string cass::AlphaCounter::increaseDirCounter ( const std::string &  fname)
inlinestatic

increase the alpha counter

Returns
filename with alphabetically increased subdir
Parameters
fnamethe Filename whos subdir should be increased

Definition at line 227 of file convenience_functions.h.

References QString::append(), QDir::exists(), QFileInfo::fileName(), QString::fromLatin1(), QString::fromStdString(), QDir::mkpath(), QFileInfo::path(), and QString::toLatin1().

Referenced by cass::pp1500::processEvent(), and cass::pp1002::writeEventToSingleFile().

static std::string cass::AlphaCounter::increaseFileCounter ( const std::string &  fname)
inlinestatic

increase the alpha counter in the file name

Returns
filename with alphabetically increased subdir
Parameters
fnamethe Filename whos subdir should be increased

Definition at line 263 of file convenience_functions.h.

References QFileInfo::baseName(), QString::fromLatin1(), QString::fromStdString(), QFileInfo::path(), and QFileInfo::suffix().

Referenced by cass::pp1002::appendEventToMultipleEventsFile(), and cass::pp1002::writeEventToMultipleEventsFile().

static std::string cass::AlphaCounter::intializeDir ( const std::string &  fname)
inlinestatic

initialize the directory

add an alphabtically subdir to the dir of the filename

Returns
the filename containing the new subdir
Parameters
fnamethe filenname whos dir should be modified

Definition at line 173 of file convenience_functions.h.

References QDir::exists(), QFileInfo::fileName(), QString::fromStdString(), QDir::mkpath(), and QFileInfo::path().

Referenced by cass::pp1500::loadSettings(), and cass::pp1002::loadSettings().

static std::string cass::AlphaCounter::intializeFile ( const std::string &  fname)
inlinestatic

initialize the filename

add an alphabtically ending to the filename

Returns
the filename containing the new counter ending
Parameters
fnamethe filenname with appended counter ending

Definition at line 193 of file convenience_functions.h.

References QFileInfo::baseName(), QString::fromStdString(), QFileInfo::path(), and QFileInfo::suffix().

Referenced by cass::pp1002::loadSettings().

static std::string cass::AlphaCounter::removeAlphaSubdir ( const std::string &  fname)
inlinestatic

remove the alpha counter subdir from filename

Returns
filename without the alphacounter subdir
Parameters
fnameThe filename who's subdir should be removed

Definition at line 208 of file convenience_functions.h.

References QString::append(), QFileInfo::fileName(), QString::fromStdString(), and QFileInfo::path().

Referenced by cass::pp1500::aboutToQuit(), and cass::pp1002::writeSummaryToSingleFile().


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