next up previous contents index Api Refernce
Next: 1.2 A simple sample Up: 1 Introduction Previous: 1 Introduction

1.1 Overview

This CmdLine library eases parsing the options and arguments given at the command line. The library will handle all of the following cases:
% sample_prog -h
% sample_prog -N 1
% sample_prog -N 1 2 3 -S "a string argument"

The library will set objects of any type or class to the values given at the command line.

It may also call a user defined function for each command line option argument.

In either case a string given at the command line has to be casted in an object of a certain type.

For any class T this cast is done using istream& operator >>(istream&, T&).

The only exception are std::string-objects: here either the constructor string(const char*) or the string& operator =(const char *) is used.


next up previous contents index Api Refernce
Next: 1.2 A simple sample Up: 1 Introduction Previous: 1 Introduction
Christian Neise
2003-01-12