arg_parser Class Reference

#include <arg_parser.h>

Collaboration diagram for arg_parser:
Collaboration graph
[legend]

List of all members.

Classes

struct  arg_record

Public Types

enum  arg_type {
  BOOLEAN, INTEGER, STRING, STRING_LIST,
  FLOAT, DOUBLE, LONG_LONG
}

Public Member Functions

 arg_parser ()
 arg_parser (arg_record *record_ptr)
 ~arg_parser ()
void get_arg_array (arg_record[])
bool check_args (int &argc, char *argv[], bool caxoe=true)

Static Public Member Functions

static void set_global_args (int argc, const char *const argv[])
static std::string get_global_args ()

Public Attributes

arg_record last_arg

Private Member Functions

void remove_arg (int arg_to_remove, int &argc, char **argv)
bool check_remaining (int argc, char **argv, bool complain_and_exit_on_error)

Private Attributes

arg_recordarray_of_arg_records
int num_args

Static Private Attributes

static std::string global_args

Friends

std::ostream & operator<< (std::ostream &, const arg_parser &)

Detailed Description

Definition at line 42 of file arg_parser.h.


Member Enumeration Documentation

Enumerator:
BOOLEAN 
INTEGER 
STRING 
STRING_LIST 
FLOAT 
DOUBLE 
LONG_LONG 

Definition at line 80 of file arg_parser.h.


Constructor & Destructor Documentation

arg_parser::arg_parser (  )  [inline]

Definition at line 92 of file arg_parser.h.

References array_of_arg_records, and num_args.

arg_parser::arg_parser ( arg_record record_ptr  )  [inline]

Definition at line 97 of file arg_parser.h.

References get_arg_array().

arg_parser::~arg_parser (  )  [inline]

Definition at line 101 of file arg_parser.h.


Member Function Documentation

bool arg_parser::check_args ( int &  argc,
char *  argv[],
bool  caxoe = true 
)
bool arg_parser::check_remaining ( int  argc,
char **  argv,
bool  complain_and_exit_on_error 
) [private]

Definition at line 210 of file arg_parser.cpp.

Referenced by check_args().

void arg_parser::get_arg_array ( arg_record  ptr[]  ) 

Definition at line 53 of file arg_parser.cpp.

References array_of_arg_records, and num_args.

Referenced by arg_parser().

static std::string arg_parser::get_global_args (  )  [inline, static]

Definition at line 110 of file arg_parser.h.

References global_args.

Referenced by MSTCluster::guiPrintClusterTree(), and MST::serialize().

void arg_parser::remove_arg ( int  arg_to_remove,
int &  argc,
char **  argv 
) [private]

Definition at line 197 of file arg_parser.cpp.

Referenced by check_args().

void arg_parser::set_global_args ( int  argc,
const char *const   argv[] 
) [static]

Definition at line 43 of file arg_parser.cpp.

References global_args.

Referenced by main().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const arg_parser  
) [friend]

Member Data Documentation

Definition at line 113 of file arg_parser.h.

Referenced by arg_parser(), check_args(), get_arg_array(), and operator<<().

std::string arg_parser::global_args [static, private]

Definition at line 131 of file arg_parser.h.

Referenced by get_global_args(), and set_global_args().

Definition at line 90 of file arg_parser.h.

int arg_parser::num_args [private]

Definition at line 114 of file arg_parser.h.

Referenced by arg_parser(), check_args(), and get_arg_array().


The documentation for this class was generated from the following files:

Generated on 19 Mar 2010 for PEACE by  doxygen 1.6.1