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

givenClp.c File Reference

Structure to store a simulated boolean value for all command line arguments. More...

Go to the source code of this file.

Data Structures

struct  GivenCommandLineParameters

Defines

#define GIVENCLP_VERSION   "1.0.1"
#define GIVENCLP_DATE   "09-JUN-2004"

Typedefs

typedef GivenCommandLineParametersGiven_CLP_Ptr
 A pointer to structure GivenCommandLineParameters is assigned the name Given_CLP_Ptr.


Functions

Given_CLP_Ptr GivenClp_create (void)
 Creates a GivenCommandLineParameters structure.

void GivenClp_destroy (Given_CLP_Ptr givenClpPtr)
 Destroys a GivenCommandLineParameters structure.

void GivenClp_display (const Given_CLP_Ptr givenClpPtr, FILE *outputStream)
 Displays a GivenCommandLineParameters structure.

void GivenClp_setOption (const Given_CLP_Ptr givenClpPtr, const int option, const int boolean_value)
 The option option of a GivenCommandLineParameters structure is set to boolean_value.

int GivenClp_getOption (const Given_CLP_Ptr givenClpPtr, const int option)
 The current value of option option of a GivenCommandLineParameters structure is returned.


Detailed Description

Structure to store a simulated boolean value for all command line arguments.

This structure provides a way to store simulated boolean values (BOOLEAN_TRUE or BOOLEAN_FALSE) for all command line arguments. It is used to store the information whether a specific command line argument is given or not. All values are set to BOOLEAN_FALSE during the creation of the structure via GivenClp_create.

The structure is created with GivenClp_create, destroyed with GivenClp_destroy and displayed with GivenClp_display. With GivenClp_setOption and GivenClp_getOption the values of the individual members of the structure GivenCommandLineParameters could be set or gotten.

Description of the members:

oOptionGiven - indicates whether the o option is given at the command line
rOptionGiven - indicates whether the r option is given at the command line

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

09/06/2004 - Uli Fechner - v1.0.1 - adjusted according to the needs of countSmarts \code

Definition in file givenClp.c.


Define Documentation

#define GIVENCLP_DATE   "09-JUN-2004"
 

Definition at line 3 of file givenClp.c.

Referenced by displayVersionInformation().

#define GIVENCLP_VERSION   "1.0.1"
 

Definition at line 2 of file givenClp.c.

Referenced by displayVersionInformation().


Typedef Documentation

typedef GivenCommandLineParameters* Given_CLP_Ptr
 

A pointer to structure GivenCommandLineParameters is assigned the name Given_CLP_Ptr.

Definition at line 39 of file givenClp.c.

Referenced by GivenClp_create(), and parseClp().


Function Documentation

Given_CLP_Ptr GivenClp_create void   ) 
 

Creates a GivenCommandLineParameters structure.

The structure GivenCommandLineParameters is created. The memory of the structure is allocated automatically. The values of all members are set to BOOLEAN_FALSE.

Return values:
Given_CLP_Ptr pointer on the newly created structure GivenCommandLineParameters
Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

09/06/2004 - Uli Fechner - adjusted according to the needs of countSmarts

Definition at line 64 of file givenClp.c.

References BOOLEAN_FALSE, Given_CLP_Ptr, MemoryError, GivenCommandLineParameters::mOptionGiven, GivenCommandLineParameters::oOptionGiven, GivenCommandLineParameters::sOptionGiven, and GivenCommandLineParameters::uOptionGiven.

Referenced by parseClp().

void GivenClp_destroy Given_CLP_Ptr  givenClpPtr  ) 
 

Destroys a GivenCommandLineParameters structure.

The structure GivenCommandLineParameters the pointer givenClpPtr refers to is destroyed. The allocated memory of the structure is automatically freed.

Parameters:
givenClpPtr pointer on the structure GivenCommandLineParameters that should be destroyed
Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

Definition at line 87 of file givenClp.c.

References AbortProgram.

Referenced by parseClp().

void GivenClp_display const Given_CLP_Ptr  givenClpPtr,
FILE *  outputStream
 

Displays a GivenCommandLineParameters structure.

The structure GivenCommandLineParameters the pointer givenClpPtr refers to is displayed on the FILE* outputStream.

Parameters:
givenClpPtr pointer on the structure GivenCommandLineParameters that should be displayed
outputStream FILE* on the stream the output should be sent to
Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

09/06/2004 - Uli Fechner - adjusted according to the needs of countSmarts

Definition at line 110 of file givenClp.c.

References GivenCommandLineParameters::mOptionGiven, GivenCommandLineParameters::oOptionGiven, GivenCommandLineParameters::sOptionGiven, and GivenCommandLineParameters::uOptionGiven.

int GivenClp_getOption const Given_CLP_Ptr  givenClpPtr,
const int  option
 

The current value of option option of a GivenCommandLineParameters structure is returned.

The return value boolean_value could either have the value BOOLEAN_TRUE or BOOLEAN_FALSE.

Parameters:
givenClpPtr pointer on the structure GivenCommandLineParameters
option character of the option to be set (o, r)
Return values:
int one of the two defines BOOLEAN_TRUE or BOOLEAN_FALSE
Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

09/06/2004 - Uli Fechner - adjusted according to the needs of countSmarts

Definition at line 164 of file givenClp.c.

References AbortProgram, GivenCommandLineParameters::mOptionGiven, GivenCommandLineParameters::oOptionGiven, GivenCommandLineParameters::sOptionGiven, and GivenCommandLineParameters::uOptionGiven.

Referenced by parseClp().

void GivenClp_setOption const Given_CLP_Ptr  givenClpPtr,
const int  option,
const int  boolean_value
 

The option option of a GivenCommandLineParameters structure is set to boolean_value.

The parameter boolean_value could either have the value BOOLEAN_TRUE or BOOLEAN_FALSE.

Parameters:
givenClpPtr pointer on the structure GivenCommandLineParameters
option character of the option to be set (o, r)
boolean_value one of the two defines BOOLEAN_TRUE or BOOLEAN_FALSE
Author:
Uli Fechner
Version:
13/05/2003 - Uli Fechner - initial release

09/06/2004 - Uli Fechner - adjusted according to the needs of countSmarts

Definition at line 129 of file givenClp.c.

References AbortProgram, GivenCommandLineParameters::mOptionGiven, GivenCommandLineParameters::oOptionGiven, GivenCommandLineParameters::sOptionGiven, and GivenCommandLineParameters::uOptionGiven.

Referenced by parseClp().


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