CLAP
(Command Line Argument Parsing)

Version 0.9

CLAP is a C++ package that enables a programmer to define and parse command line arguments easily.
It was developed by the developers of the Computational Geometry Projects in the Computer Science Department of Ben-Gurion University of the Negev, Israel.


This page was designed by Haggai David.
Send your comments to davidcha@cs.bgu.ac.il
Copyright © 1997 Haggai David, All rights reserved.



Introduction

The purpose of this package is to make life easier of parsing the command line arguments.
In your program each command line argument should be presented as an object of its type, but first you should get familiar with the container of the command argument objects.

CmdLine


 CmdArg - Introduction

CmdArg is a base class of all Command Line Argument classes. It supplies the following:  CmdArgInt CmdArgFloat CmdArgBool CmdArgChar CmdArgStr


CmdArgLists - Introduction

The package gives an option to get lists from the command line by using the lists objects.
The lists objects has the following interface: Each list object can initialize with minimum and maximum expected arguments and with various delimiters.

CmdArgIntList

CmdArgFloatList CmdArgCharList CmdArgStrList

How To Use

All you need to do in order to combine the package in your program:

Simple Example

This example demonstrates handling of three command line arguments:
 
Name Type Default Value Syntax
height int 0 isREQ | isVALREQ
width int 10 isREQ | isVALREQ
filename char* unname.txt isOPT | isVALREQ

You can find the source and running examples here

More Complex Example

This example demonstrates the use of booleans chars and floats
You can find the source and running example here.

Bug Reports

For users who want to report for bugs please mail to davidcha@cs.bgu.ac.il
Questions are welcome as well.

Thanks

To friends who helped.

This page was designed by Haggai David.
Send your comments to davidcha@cs.bgu.ac.il
Copyright © 1997 Haggai David, All rights reserved.

Back