DGD Library
Version: 0.1.0.14 | Updated: Thu Aug 10 16:58:17 2006
Home
DGD News
FAQ
Code Documentation
DGD Installation Guide
Bugs-n-Features
DGD at Sourceforge.net
Download DGD
Subversion
Code Documentation
Documentation
Namespaces
Class Hierarchy
Class List
File List
Namespace Members
Functions
Globals
Tutorial
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

DGD::option_filter Class Reference

Command line options set filter. More...

#include <dgOptionFilter.h>

List of all members.

Public Types

Public Member Functions

  • option_set_container * operator() (int argc, char **argv, int filtc, char **filtv)
    This operator takes <argc,argv> as received by main function, then it takes a set of regular expressions defined by <filtc, filtv> and returns a set (vector) of option subsets.


Detailed Description

Command line options set filter.

This class is designed to separate a set of command line options as received by

 main(int argc,
 char** argv) 
into subsets. This can be used by application using DGD::Debug for separating debug options from the application-specific options. Terminology:
Options set
In the context of this class a pair of <int,char**> representing a set of option strings.
Option set filter
A regular expression which is applied on the given option set (usually full option set received by main()). If the option matches the filter it is copied to the option set associated with that filter.
See also:
DGD::Debug


Member Typedef Documentation

typedef std::vector<option_set_type> DGD::option_filter::option_set_container
 


Member Function Documentation

option_filter::option_set_container * DGD::option_filter::operator() int argc,
char ** argv,
int filtc,
char ** filtv
 

This operator takes <argc,argv> as received by main function, then it takes a set of regular expressions defined by <filtc, filtv> and returns a set (vector) of option subsets.

First set is generated by the first filter, second set by the second filter and so on, the last set contains options which were not selected by any filter. so the following is always true result->size() == filtc + 1.

Note that the returned option_set_container is dynamically allocated and must be deallocated by using explicit delete operator.

See also:
DGD::Debug


The documentation for this class was generated from the following files:
Generated on Thu Aug 10 16:48:31 2006 for DGD Library by doxygen1.3

SourceForge.net Logo Powered by Mason Powered by Perl
Web design derived from Pasilda design found on www.oswd.org.
Copyright (c) 2002, 2003. Dimitry Kloper <kloper@users.sourceforge.net>