options.cpp File Reference

#include <iostream>
#include <string>
#include <sstream>
#include "datatypes.h"
#include "options.h"

Defines

#define PARSE_BOOL_PARAM(SHORT, LONG, VALUE)
#define PARSE_INVERSE_BOOL_PARAM(SHORT, LONG, VALUE)
#define PARSE_SCALAR_PARAM(SHORT, LONG, VALUE)
#define PARSE_SCALAR_PARAM2(SHORT, LONG, VALUE1, VALUE2)

Define Documentation

#define PARSE_BOOL_PARAM ( SHORT,
LONG,
VALUE   ) 

Value:

else if(str == SHORT || str == LONG)                 \
      VALUE = true;

#define PARSE_INVERSE_BOOL_PARAM ( SHORT,
LONG,
VALUE   ) 

Value:

else if(str == SHORT || str == LONG)                 \
      VALUE = false;

#define PARSE_SCALAR_PARAM ( SHORT,
LONG,
VALUE   ) 

Value:

else if(str == SHORT || str == LONG)                 \
    {                                                    \
      if(argc < 1 || argv[i+1][0] == '-')                \
        return false;                                    \
      std::stringstream tmp;                             \
      tmp << argv[i+1];                                  \
      tmp >> VALUE;                                      \
      argc--;                                            \
      i++;                                               \
    }

#define PARSE_SCALAR_PARAM2 ( SHORT,
LONG,
VALUE1,
VALUE2   ) 

Value:

else if(str == SHORT || str == LONG)                 \
    {                                                    \
      if(argc < 2 ||                                     \
         argv[i+1][0] == '-' || argv[i+2][0] == '-')     \
        return false;                                    \
      std::stringstream tmp;                             \
      tmp << argv[i+1] << " " << argv[i+2];              \
      tmp >> VALUE1;                                     \
      tmp >> VALUE2;                                     \
      argc-=2;                                           \
      i+=2;                                              \
    }


Generated on Sun Oct 7 23:43:49 2007 for anytun by  doxygen 1.5.1