Go to the source code of this file.
Data Structures | |
struct | CommandLineParameters |
Defines | |
#define | CLP_VERSION "1.0.4" |
#define | CLP_DATE "29-Jan-2004" |
Typedefs | |
typedef CommandLineParameters * | CLP_Ptr |
A pointer to structure CommandLineParameters is assigned the name CLP_Ptr . | |
Functions | |
CLP_Ptr | CLP_create (void) |
Creates a CommandLineParameters structure. | |
void | CLP_destroy (CLP_Ptr clpPtr) |
Destroys a structure CommandLineParameters. | |
void | CLP_display (const CLP_Ptr clpPtr, FILE *outputStream) |
Displays a structure CommandLineParameters. | |
void | CLP_setOutputFile (const CLP_Ptr clpPtr, const char *const name) |
The name of the output file is set. | |
char * | CLP_getOutputFile (const CLP_Ptr clpPtr) |
The name of the output file is returned. | |
void | CLP_setReactionFile (const CLP_Ptr clpPtr, const char *const name) |
The name of the reaction file is set. | |
char * | CLP_getReactionFile (const CLP_Ptr clpPtr) |
The name of the reaction file is returned. | |
void | CLP_setErrorLogFile (const CLP_Ptr clpPtr, const char *const name) |
The name of the error log file is set. | |
char * | CLP_getErrorLogFile (const CLP_Ptr clpPtr) |
The name of the error log file is returned. | |
void | CLP_setFilterFile (const CLP_Ptr clpPtr, const char *const name) |
The name of the filter file is set. | |
char * | CLP_getFilterFile (const CLP_Ptr clpPtr) |
The name of the filter file is returned. | |
void | CLP_setSmartsFile (const CLP_Ptr clpPtr, const char *const name) |
The name of the Smarts file is set. | |
char * | CLP_getSmartsFile (const CLP_Ptr clpPtr) |
The name of the Smarts file is returned. |
This structure provides a fault-tolerant way to store the values of all command line arguments. The values are set to their default values during the creation of the structure via CLP_create. The memory allocation of the members of the structure is managed automatically.
The structure is created with CLP_create, destroyed with CLP_destroy and displayed with CLP_display. With CLP_setnameOfVariable and CLP_getnameOfVariable the values of the individual members of the structure CommandLineParameters could be set or gotten.
Whenever a string is set the provided string is copied via strncpy
. Hence, the string provided as an argument has to be freed by the caller of the function.
Description of the members:
outputFile
- string containing the name of the output file.
reactionFile
- string storing the name of the reaction file.
errorLogFile
- string storing the name of the SMILES error log file.
24/11/2003 - Uli Fechner - v1.0.1 - modified according to the needs of retroflux
03/12/2003 - Uli Fechner - v1.0.2 - added the member errorLogFile
07/01/2004 - Uli Fechner - v1.0.3 - added the member filterFile
29/01/2004 - Tina Grabowski - v1.0.4 - added the member smartsFile
and the corresponding functions CLP_getSmartsFile and CLP_setSmartsFile; consideration of smartsFile
in CLP_create, CLP_display and CLP_destroy \code
Definition in file clp.c.
|
Definition at line 3 of file clp.c. Referenced by displayVersionInformation(). |
|
Definition at line 2 of file clp.c. Referenced by displayVersionInformation(). |
|
A pointer to structure CommandLineParameters is assigned the name
Definition at line 48 of file clp.c. Referenced by CLP_create(), displayHelpText(), main(), and parseClp(). |
|
Creates a CommandLineParameters structure. The structure CommandLineParameters is created. The memory of the structure itself and the members of the structure is allocated automatically. The values of the individual command line parameters are set to default values as written in the help text.
Definition at line 93 of file clp.c. References CLP_Ptr, CLP_setErrorLogFile(), CLP_setFilterFile(), CLP_setOutputFile(), CLP_setReactionFile(), CLP_setSmartsFile(), and MemoryError. Referenced by main(). |
|
Destroys a structure CommandLineParameters.
The structure CommandLineParameters the pointer
Definition at line 123 of file clp.c. References AbortProgram, CLP_getFilterFile(), CLP_getOutputFile(), CLP_getReactionFile(), and CLP_getSmartsFile(). Referenced by main(). |
|
Displays a structure CommandLineParameters.
The structure CommandLineParameters the pointer
Definition at line 159 of file clp.c. References CLP_getErrorLogFile(), CLP_getFilterFile(), CLP_getOutputFile(), CLP_getReactionFile(), CLP_getSmartsFile(), CommandLineParameters::filterFile, CommandLineParameters::reactionFile, and CommandLineParameters::smartsFile. Referenced by main(). |
|
The name of the error log file is returned.
Definition at line 272 of file clp.c. References CommandLineParameters::errorLogFile. Referenced by CLP_display(), and main(). |
|
The name of the filter file is returned.
Definition at line 307 of file clp.c. References CommandLineParameters::filterFile. Referenced by CLP_destroy(), CLP_display(), and main(). |
|
The name of the output file is returned.
Definition at line 202 of file clp.c. References CommandLineParameters::outputFile. Referenced by CLP_destroy(), CLP_display(), main(), and parseClp(). |
|
The name of the reaction file is returned.
Definition at line 237 of file clp.c. References CommandLineParameters::reactionFile. Referenced by CLP_destroy(), CLP_display(), and main(). |
|
The name of the Smarts file is returned.
Definition at line 342 of file clp.c. References CommandLineParameters::smartsFile. Referenced by CLP_destroy(), and CLP_display(). |
|
The name of the error log file is set.
Definition at line 253 of file clp.c. References CommandLineParameters::errorLogFile, and MemoryError. Referenced by CLP_create(), and parseClp(). |
|
The name of the filter file is set.
Definition at line 288 of file clp.c. References CommandLineParameters::filterFile, and MemoryError. Referenced by CLP_create(), and parseClp(). |
|
The name of the output file is set.
Definition at line 183 of file clp.c. References MemoryError, and CommandLineParameters::outputFile. Referenced by CLP_create(), and parseClp(). |
|
The name of the reaction file is set.
Definition at line 218 of file clp.c. References MemoryError, and CommandLineParameters::reactionFile. Referenced by CLP_create(), and parseClp(). |
|
The name of the Smarts file is set.
Definition at line 323 of file clp.c. References MemoryError, and CommandLineParameters::smartsFile. Referenced by CLP_create(). |