Main Page | Data Structures | File List | Data Fields | Globals

generalDefines.h File Reference

This file contains several defines that are used throughout the program. More...

Go to the source code of this file.

Defines

#define GENERALDEFINES_VERSION   "1.0.2"
#define GENERALDEFINES_DATE   "29-Jan-2003"
#define COUNTSMARTS_DEBUG   0
 If FLUX_DEBUG is set to 1 some debug information is written to the output file.

#define BOOLEAN_FALSE   0
 Simulates the boolean value false.

#define BOOLEAN_TRUE   1
 Simulates the boolean value true.

#define DAYLIGHT_SMILES   1
 If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMILES a SMILES is created.

#define DAYLIGHT_SMIRKS   2
 If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMIRKS a SMIRKS is created.

#define DAYLIGHT_SMARTS   3
 If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMARTS a SMARTS is created.

#define AbortProgram   fprintf( stderr, "Program aborted.\n\n" ), exit( EXIT_FAILURE )
 Final part of the abortion sequence of the program.

#define MemoryError(Variable, Function)
 Indicates a fatal memory error.

#define FileReadError(FileName)
 Indicates a read error of an input file.

#define FileWriteError(FileName)
 Indicates a write error of an output file.

#define FileIntegrityError(FileName, Row, Columns, ColumnsBefore)
 Indicates a file integrity error of an input file.

#define OptionIncompatibility(Option, NotOrExclusively, RegardedOptions)
 Indicates an incompatibility of command line arguments/options.

#define MandatoryOption(Option)
 Indicates a missing command line arguments/options that is mandatory.

#define IndexOutOfBoundsError(StructureName, NumberOfElements, Index)
 Indicates an index out of bounds error.


Detailed Description

This file contains several defines that are used throughout the program.

Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - v1.0.0 - initial release

24/11/2003 - Uli Fechner - v1.0.1 - modifications to comply to the needs of flux

29/01/2004 - Tina Grabowski - v1.0.2 - added DAYLIGHT_SMILES, DAYLIGHT_SMIRKS DAYLIGHT_SMARTS

Definition in file generalDefines.h.


Define Documentation

#define AbortProgram   fprintf( stderr, "Program aborted.\n\n" ), exit( EXIT_FAILURE )
 

Final part of the abortion sequence of the program.

If a detectable error occurs during runtime the program initiates an abortion sequence. This consists of printing a message on standard error that is related to the error and this define to print a final message and exit the program with the exit code EXIT_FAILURE. Such detectable errors include wrong command line arguments, missing input files, inconsistent input files, index out of bounds errors, memory allocation errors and so on.

Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 90 of file generalDefines.h.

Referenced by CLP_destroy(), CLP_setMatchingType(), DoubleArray_copy(), DoubleArray_destroy(), DoubleArray_display(), DoubleArray_displayIntegers(), getFileProperties(), GivenClp_destroy(), GivenClp_getOption(), GivenClp_setOption(), List_create(), List_destroy(), List_getNext(), List_remove(), List_removeHead(), List_removeTail(), parseClp(), SmilesCompound_destroy(), and StringArray_destroy().

#define BOOLEAN_FALSE   0
 

Simulates the boolean value false.

Together with BOOLEAN_TRUE a boolean variable is simulated in C.

Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

Definition at line 37 of file generalDefines.h.

#define BOOLEAN_TRUE   1
 

Simulates the boolean value true.

Together with BOOLEAN_FALSE a boolean variable is simulated in C.

Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

Definition at line 47 of file generalDefines.h.

#define COUNTSMARTS_DEBUG   0
 

If FLUX_DEBUG is set to 1 some debug information is written to the output file.

Author:
Uli Fechner
Version:
24/11/2003 - Uli Fechner - initial release

Definition at line 27 of file generalDefines.h.

#define DAYLIGHT_SMARTS   3
 

If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMARTS a SMARTS is created.

Author:
Tina Grabowski
Version:
29/01/2004 - Tina Grabowski - initial release

Definition at line 74 of file generalDefines.h.

Referenced by main(), SmilesCompound_create(), and SmilesCompound_setSmiles().

#define DAYLIGHT_SMILES   1
 

If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMILES a SMILES is created.

Author:
Tina Grabowski
Version:
29/01/2004 - Tina Grabowski - initial release

Definition at line 56 of file generalDefines.h.

Referenced by main(), SmilesCompound_create(), and SmilesCompound_setSmiles().

#define DAYLIGHT_SMIRKS   2
 

If parameter daylight_type in SmilesCompound_create is set to DAYLIGHT_SMIRKS a SMIRKS is created.

Author:
Tina Grabowski
Version:
29/01/2004 - Tina Grabowski - initial release

Definition at line 65 of file generalDefines.h.

Referenced by SmilesCompound_create(), and SmilesCompound_setSmiles().

#define FileIntegrityError FileName,
Row,
Columns,
ColumnsBefore   ) 
 

Value:

fprintf( stderr, "\n\nERROR: File error.\n" ), \
        fprintf( stderr, "\nFile %s does not contain the same number of columns in all rows!\n", FileName ), \
        fprintf( stderr, "Row %d has %d columns, rows before have %d columns.\n", Row, Columns, ColumnsBefore ), \
        AbortProgram
Indicates a file integrity error of an input file.

If a file integrity error of an input file occurs at any time during program execution, this define is called. It prints a message on standard error and calls the define AbortProgram. A file integrity error means that an input file has not the same number of columns in all of its rows.

Parameters:
FileName string that contains the name of the file the integrity error occures
Row integer that contains the number of the row the different number of columns appeared
Columns integer containing the number of columns that appear in Row
ColumnsBefore integer containing the number of columns that rows have before Row
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 156 of file generalDefines.h.

Referenced by getFileProperties().

#define FileReadError FileName   ) 
 

Value:

fprintf( stderr, "\n\nERROR: File error.\n" ), \
        fprintf( stderr, "\nCould not read from %s!\n", FileName ), \
        AbortProgram
Indicates a read error of an input file.

If a read error of an input file occurs at any time during program execution, this define is called. It prints a message on standard error and calls the define AbortProgram.

Parameters:
FileName string containing the name of the file the read error occured
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 120 of file generalDefines.h.

Referenced by readDataFromFile().

#define FileWriteError FileName   ) 
 

Value:

fprintf( stderr, "\n\nERROR: File error.\n" ), \
        fprintf( stderr, "\nCould not write to %s!\n", FileName ), \
        AbortProgram
Indicates a write error of an output file.

If a write error of an output file occurs at any time during program execution, this define is called. It prints a message on standard error and calls the define AbortProgram.

Parameters:
FileName string containing the name of the file the write error occured
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 136 of file generalDefines.h.

Referenced by main().

#define GENERALDEFINES_DATE   "29-Jan-2003"
 

Definition at line 17 of file generalDefines.h.

Referenced by displayVersionInformation().

#define GENERALDEFINES_VERSION   "1.0.2"
 

Definition at line 16 of file generalDefines.h.

Referenced by displayVersionInformation().

#define IndexOutOfBoundsError StructureName,
NumberOfElements,
Index   ) 
 

Value:

fprintf( stderr, "\n\nERROR: Index out of bounds.\n" ), \
        fprintf( stderr, "Structure %s has only %d elements.\n", StructureName, NumberOfElements ), \
        fprintf( stderr, "These are indexed from 0 to %d.\n", NumberOfElements - 1), \
        fprintf( stderr, "There is no element with index %d!\n\n", Index ), \
        AbortProgram
Indicates an index out of bounds error.

If an element of a structure is accessed that is not available this define is called. Such a situation might occur, if the index of the element is bigger than the number of elements the structure has. The access could be a read or a write operation. An appropriate message is printed on standard error and the define AbortProgram is called.

Parameters:
StructureName string containing the name of the structure
NumberOfElements integer containing the number of elements of the structure
Index integer containing the index of the element that should be accessed
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 218 of file generalDefines.h.

Referenced by DoubleArray_getValue(), DoubleArray_setValue(), and StringArray_getElement().

#define MandatoryOption Option   ) 
 

Value:

fprintf( stderr, "\nERROR: The %s option is mandatory!\n", Option ), \
        fprintf( stderr, "Type 'retroflux -h' for a detailed help text!\n"), \
        AbortProgram
Indicates a missing command line arguments/options that is mandatory.

The term option refers in the following text to arguments and options provided via the command line when starting the program. An MandatoryOption error occurs if a mandatory option is not provided at the command line. This is checked in the function parseClp. If such an event takes place this define is called. It prints an appropriate message on standard error and calls the define AbortProgram.

Parameters:
Option character with the command line abbreviation of the mandatory option
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 198 of file generalDefines.h.

Referenced by parseClp().

#define MemoryError Variable,
Function   ) 
 

Value:

fprintf( stderr, "\n\nERROR: Fatal memory error.\n" ), \
        fprintf( stderr, "Allocation of memory for %s in function %s failed.\n", Variable, Function ), \
        AbortProgram
Indicates a fatal memory error.

If allocation of memory fails at any time during program execution, this define is called. It prints an appropriate message on standard error and calls the define AbortProgram.

Parameters:
Variable string containing the name of the variable memory allocation failed
Function string containing the name of the function that tried to allocate memory
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 104 of file generalDefines.h.

Referenced by CLP_create(), CLP_setErrorLogFile(), CLP_setOutputFile(), CLP_setSmartsFile(), DoubleArray_copy(), DoubleArray_create(), DoubleArray_createWithIdentifier(), getFileProperties(), GivenClp_create(), List_create(), List_insert(), List_insertHead(), List_insertTail(), List_setName(), parseClp(), readDataFromStream(), SmilesCompound_addName(), SmilesCompound_copy(), SmilesCompound_create(), SmilesCompound_setName(), SmilesCompound_setSmiles(), StringArray_concatenate(), StringArray_copy(), StringArray_createWithSpecifiedArraySize(), StringArray_extend(), and StringArray_mapConcatenate().

#define OptionIncompatibility Option,
NotOrExclusively,
RegardedOptions   ) 
 

Value:

fprintf( stderr, "\nERROR: The %s option may %s ", Option, NotOrExclusively ), \
        fprintf( stderr, "be used together with the %s option!\n", RegardedOptions ), \
        fprintf( stderr, "Type 'speedcats -h' for a detailed help text!\n"), \
        AbortProgram
Indicates an incompatibility of command line arguments/options.

The term option refers in the following text to arguments and options provided via the command line when starting the program. An OptionIncompatibility occurs if one options is not allowed to be used with another option or one option has to be used together with another option that is not provided. This is checked in the function parseClp. If such an event takes place this define is called. It prints an appropriate message on standard error and calls the define AbortProgram.

Parameters:
Option character with the command line abbreviation of the option causing OptionIncompatibility
NotOrExclusively string containing either the word not or exclusively
RegardedOptions string containing the option(s) Option is incompatible with
Author:
Uli Fechner
Version:
05/13/2003 - Uli Fechner - initial release

Definition at line 178 of file generalDefines.h.


Generated on Mon Nov 8 16:04:07 2004 for countSmarts by doxygen 1.3.6