MdfConsoleEngine Class Reference

This class encapsulates data structures and operations for modifying Dicom-files from the commandline. More...

List of all members.

Public Member Functions

 MdfConsoleEngine (int argc, char *argv[], const char *appl_name)
 Constructor.
 ~MdfConsoleEngine ()
 Destructor.
int startProvidingService ()
 This function looks at commandline options and decides what to do.

Protected Member Functions

void splitPathAndValue (const OFString &whole, OFString &path, OFString &value)
 This function splits a modify-option (inclusive value) as found on commandline into to parts (path and value) e.g.
int executeJob (const MdfJob &job)
 Executes given modify-job.
void parseCommandLine ()
 Parses commandline options into corresponding file- and job-lists and enables debug/verbose mode.
OFCondition loadFile (const char *filename)
 Backup and load file into internal MdfDatasetManager.
OFCondition backupFile (const char *file_name)
 Backup given file from file to file.bak.
OFCondition restoreFile (const char *filename)
 Restore given file from file.bak to original (without .bak).

Protected Attributes

OFConsoleApplicationapp
 helper class for console-applications
OFCommandLinecmd
 helper class for command-line-parsing
MdfDatasetManagerds_man
 ds_man holds DatasetManager, that is used for modify operations
OFBool verbose_option
 verbose mode
OFBool debug_option
 debug mode
OFBool ignore_errors_option
 ignore errors option
OFList< MdfJob > * jobs
 list of jobs to be executed
OFList< OFString > * files
 list of files to be modified

Private Member Functions

MdfConsoleEngineoperator= (const MdfConsoleEngine &)
 private undefined assignment operator
 MdfConsoleEngine (const MdfConsoleEngine &)
 private undefined copy constructor


Detailed Description

This class encapsulates data structures and operations for modifying Dicom-files from the commandline.

Definition at line 70 of file mdfconen.h.


Constructor & Destructor Documentation

MdfConsoleEngine::MdfConsoleEngine int  argc,
char *  argv[],
const char *  appl_name
 

Constructor.

Parameters:
argc Number of commandline-arguments
argv Array holding the Commandline-arguments
appl_name Name of calling application, that instantiates this class


Member Function Documentation

OFCondition MdfConsoleEngine::backupFile const char *  file_name  )  [protected]
 

Backup given file from file to file.bak.

Parameters:
file_name filename of file, that should be backuped
Returns:
OFCondition, whether backup was successful or not

int MdfConsoleEngine::executeJob const MdfJob job  )  [protected]
 

Executes given modify-job.

Parameters:
job job to be executed
Returns:
returns 0 if no error occured, else the number of errors

OFCondition MdfConsoleEngine::loadFile const char *  filename  )  [protected]
 

Backup and load file into internal MdfDatasetManager.

Parameters:
filename name of file to load
Returns:
OFCondition, whether loading/backuping was successful including error description

void MdfConsoleEngine::parseCommandLine  )  [protected]
 

Parses commandline options into corresponding file- and job-lists and enables debug/verbose mode.

The joblist is built in order of modify options on commandline

OFCondition MdfConsoleEngine::restoreFile const char *  filename  )  [protected]
 

Restore given file from file.bak to original (without .bak).

Parameters:
restore "filename".bak to original without .bak
Returns:
OFCondition, whether restoring was successful

void MdfConsoleEngine::splitPathAndValue const OFString whole,
OFString path,
OFString value
[protected]
 

This function splits a modify-option (inclusive value) as found on commandline into to parts (path and value) e.g.

"(0010,0010)=value" into path "(0010,0010)" and "value"

Parameters:
string to be splitted
path returns part containing the path
value returns part containing the value(if theres one)

int MdfConsoleEngine::startProvidingService  ) 
 

This function looks at commandline options and decides what to do.

It evaluates option-values from commandline and prepares them for starting the corresponding private functions.

Returns:
Returns 0 if successful, another value if errors occurreds


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


Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8