Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

DefectixOptions Namespace Reference

Options management namespace. More...


Classes

class  Options
 Class dedicated to options management. More...

struct  sOptions
 Structure containing a option. More...


Enumerations

enum  mode {
  HALO, TRAIL, TRAINING, COMPUTING,
  NOMODE
}
 Execution mode of the program. More...

enum  simulatortype { EXTENSION, MOSAIC, NOTYPE }
 Defect addition mode of the simulation. More...

enum  options_e {
  opt_help = 'h', opt_version = 'V', opt_mode = 'M', opt_conf = 'C',
  opt_input = 'I', opt_mask = 'K', opt_output = 'O', opt_efile = 'L',
  opt_rebin = 'r', opt_bsize = 'b', opt_nbpc = 'p', opt_zoom = 'z',
  opt_evec = 'E', opt_rebuilt = 'R', opt_subbg = 'S', opt_dyn = 'D',
  opt_intensity = 'i', opt_addertype = 'a', opt_nbdef = 'd', opt_verbose = 'v',
  opt_nbvec = 't', opt_maxiter = 'm', opt_energy = 'e'
}
 Options short value.


Functions

void usage (void)
 Display usage and exit.

void version (void)
 Display version and exit.

void set_option (int c, Options &options)
 Set an option from command line.

bool set_file_option (char *line, char *keyword, int key_opt, Options &options)
 Set an option from configuration file.

int conf_file_error (int line)
 Report an error in the configuration file.

void read_conf_file (FILE *f, Options &options)
 Parse a configuration file.


Detailed Description

Options management namespace.

The namespace contains enums, structures and classes to handle options.


Enumeration Type Documentation

enum DefectixOptions::mode
 

Execution mode of the program.

There is a mode for each defect simulation, a mode for training and a mode for mask creation.

Enumeration values:
HALO  mode for halos simulation
TRAIL  mode for satellite trails simulation
TRAINING  mode for training
COMPUTING  mode for mask creation
NOMODE  default value when no mode is selected

enum DefectixOptions::simulatortype
 

Defect addition mode of the simulation.

Enumeration values:
EXTENSION  Add defects on each extension calling DefectSimulator::addDefectsPerExtension().
MOSAIC  Add defects on the mosaic calling DefectSimulator::addDefectsOnMosaic().
NOTYPE  Default type when no type is chosen.


Function Documentation

int DefectixOptions::conf_file_error int  line  ) 
 

Report an error in the configuration file.

The function report an error in the current configuration file

Parameters:
line line of the error

void DefectixOptions::read_conf_file FILE *  f,
Options &  options
 

Parse a configuration file.

The function parses a configuration file and sets read values. The function calls set_file_option() for each line.

Parameters:
f configuration file
options class to store options values in

bool DefectixOptions::set_file_option char *  line,
char *  keyword,
int  key_opt,
Options &  options
 

Set an option from configuration file.

The function sets an option in the class reading a configuration file.

Parameters:
line line currently being parsed
keyword find keyword on the line
key_opt value of the found keyword
options class to store options values in

void DefectixOptions::set_option int  c,
Options &  options
 

Set an option from command line.

The function sets an option in the class using liboptget.

Parameters:
c value of the option
options class to store options values in

void DefectixOptions::usage void   ) 
 

Display usage and exit.

The function displays the usage when --h option is invoked and exits the program.

void DefectixOptions::version void   ) 
 

Display version and exit.

The function displays the version when -V option is invoked and exits the program.


Generated on Fri Jul 2 13:08:03 2004 for defectix by doxygen 1.3.5