#include <cmdlnopt.hpp>
Public Types | |
enum | Actions { aNone = 0, aOpen, aVerify, aCreate, aAppend } |
Action to do at the startup. More... | |
enum | CkSumsFileTypes { cftNone = 0, cftSFV, cftMD5 } |
Type of checksums' files that the application know. More... | |
Static Public Member Functions | |
void | cleanup () |
Cleans up the structures that take memory. | |
CkSumsFileTypes | getchecksumsFileType () |
Get the type of the checksums' file to create. | |
bool | init (const wxCmdLineParser &parser) |
Initializes the options. | |
Static Public Attributes | |
Actions | action |
Action to do at the startup of the application. | |
wxString | checksumsFileName |
Name of the checksums' file to create or where the files will be added. | |
CkSumsFileTypes | createType |
Type of the checksums' file. | |
wxArrayString | files |
List of the files given on the command line. | |
Private Member Functions | |
CmdLineOptions () | |
Default constructor. | |
Static Private Member Functions | |
bool | checkAppendOption (const wxCmdLineParser &parser) |
Checks the compatibility of the append option with other options or switchs. | |
bool | checkCreateOption (const wxCmdLineParser &parser) |
Checks the compatibility of the create option with other options or switchs. | |
bool | checkCreateTypeOption (const wxCmdLineParser &parser) |
Checks the compatibility of the create type option with other options or switchs. | |
bool | checkOpenChecksumsFile (const wxCmdLineParser &parser) |
If no action has been set, checks if a checksums' file must be opened. | |
bool | checkVerifySwitch (const wxCmdLineParser &parser) |
Checks the compatibility of the verify switch with other options or switchs. | |
void | expandFilesList (const wxCmdLineParser &parser) |
Loads the list(s) of files, delete the file that contains the list if the deleteTempLists switch is activated. | |
void | makeFilesListAbsolute (const wxString &cwd) |
Make all the names of the files in the array of files absolute. | |
Static Private Attributes | |
bool | deleteTempLists |
Delete temporary lists of files. |
Definition at line 48 of file cmdlnopt.hpp.
|
Action to do at the startup.
Definition at line 64 of file cmdlnopt.hpp. |
|
Type of checksums' files that the application know.
Definition at line 74 of file cmdlnopt.hpp. Referenced by getchecksumsFileType(). |
|
Default constructor. Don't allow to create an instance out this of this class. Definition at line 78 of file cmdlnopt.cpp. |
|
Checks the compatibility of the append option with other options or switchs.
Definition at line 337 of file cmdlnopt.cpp. References action, checkAppendOption(), checksumsFileName, makeFilesListAbsolute(), and msgOut. Referenced by checkAppendOption(), and init(). |
|
Checks the compatibility of the create option with other options or switchs.
Definition at line 403 of file cmdlnopt.cpp. References action, checkCreateOption(), checksumsFileName, makeFilesListAbsolute(), and msgOut. Referenced by checkCreateOption(), and init(). |
|
Checks the compatibility of the create type option with other options or switchs.
Definition at line 470 of file cmdlnopt.cpp. References checkCreateTypeOption(), createType, and msgOut. Referenced by checkCreateTypeOption(), and init(). |
|
If no action has been set, checks if a checksums' file must be opened. param parser Command line parser.
Definition at line 502 of file cmdlnopt.cpp. References action, checkOpenChecksumsFile(), files, and msgOut. Referenced by checkOpenChecksumsFile(), and init(). |
|
Checks the compatibility of the verify switch with other options or switchs. param parser Command line parser.
Definition at line 277 of file cmdlnopt.cpp. References action, checkVerifySwitch(), files, and msgOut. Referenced by checkVerifySwitch(), and init(). |
|
Cleans up the structures that take memory. Call this function when you do not need the command line options. Definition at line 139 of file cmdlnopt.cpp. References checksumsFileName, and files. Referenced by CkSumsApp::OnInit(). |
|
Loads the list(s) of files, delete the file that contains the list if the
Definition at line 182 of file cmdlnopt.cpp. References deleteTempLists, expandFilesList(), and files. Referenced by expandFilesList(), and init(). |
|
Get the type of the checksums' file to create. If the ct parameter has been specified, return the given type, otherwise try to get the type with the extension of the checksums' file.
Definition at line 156 of file cmdlnopt.cpp. References checksumsFileName, CkSumsFileTypes, and createType. Referenced by frmSums::initializeFromCmdLine(). |
|
Initializes the options. Should be called at the application startup. param parser Command line parser.
Definition at line 93 of file cmdlnopt.cpp. References action, checkAppendOption(), checkCreateOption(), checkCreateTypeOption(), checkOpenChecksumsFile(), checksumsFileName, checkVerifySwitch(), createType, deleteTempLists, expandFilesList(), files, getAppName(), init(), and msgOut. Referenced by init(). |
|
Make all the names of the files in the array of files absolute.
You should call
Definition at line 248 of file cmdlnopt.cpp. References files, and makeFilesListAbsolute(). Referenced by checkAppendOption(), checkCreateOption(), and makeFilesListAbsolute(). |
|
Action to do at the startup of the application.
Definition at line 60 of file cmdlnopt.cpp. Referenced by checkAppendOption(), checkCreateOption(), checkOpenChecksumsFile(), checkVerifySwitch(), and init(). |
|
Name of the checksums' file to create or where the files will be added.
Definition at line 63 of file cmdlnopt.cpp. Referenced by checkAppendOption(), checkCreateOption(), cleanup(), getchecksumsFileType(), and init(). |
|
Type of the checksums' file.
Definition at line 61 of file cmdlnopt.cpp. Referenced by checkCreateTypeOption(), getchecksumsFileType(), and init(). |
|
Delete temporary lists of files.
Definition at line 64 of file cmdlnopt.cpp. Referenced by expandFilesList(), and init(). |
|
List of the files given on the command line.
Definition at line 62 of file cmdlnopt.cpp. Referenced by checkOpenChecksumsFile(), checkVerifySwitch(), cleanup(), expandFilesList(), init(), and makeFilesListAbsolute(). |