FflasFfpack
Data Structures | Namespaces | Macros | Enumerations | Functions
utils/args-parser.h File Reference
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstring>
#include <list>
#include <stdlib.h>
#include "fflas-ffpack/utils/print-utils.h"

Data Structures

struct  Argument
 

Namespaces

namespace  FFLAS
 FFLAS: Finite Field Linear Algebra Subroutines.
 

Macros

#define TYPE_BOOL   TYPE_NONE
 
#define END_OF_ARGUMENTS   { '\0', "\0", "\0", TYPE_NONE, NULL }
 

Enumerations

enum  ArgumentType {
  TYPE_NONE, TYPE_INT, TYPE_INTEGER, TYPE_DOUBLE,
  TYPE_INTLIST, TYPE_STR, TYPE_NONE, TYPE_INT,
  TYPE_INTEGER, TYPE_DOUBLE, TYPE_INTLIST, TYPE_STR
}
 

Functions

void parseArguments (int argc, char **argv, Argument *args, bool printDefaults=true)
 
std::ostream & writeCommandString (std::ostream &os, Argument *args, char *programName)
 writes the values of all arguments, preceded by the programName More...
 
void printHelpMessage (const char *program, Argument *args, bool printDefaults=false)
 
ArgumentfindArgument (Argument *args, char c)
 
int getListArgs (std::list< int > &outlist, std::string &instring)
 transforms a string list of ints to a list of int string "12,13,15" is turned into list of ints {12,13,15} More...
 

Macro Definition Documentation

#define TYPE_BOOL   TYPE_NONE
#define END_OF_ARGUMENTS   { '\0', "\0", "\0", TYPE_NONE, NULL }

Enumeration Type Documentation

Enumerator
TYPE_NONE 
TYPE_INT 
TYPE_INTEGER 
TYPE_DOUBLE 
TYPE_INTLIST 
TYPE_STR 
TYPE_NONE 
TYPE_INT 
TYPE_INTEGER 
TYPE_DOUBLE 
TYPE_INTLIST 
TYPE_STR 

Function Documentation

std::ostream& writeCommandString ( std::ostream &  os,
Argument args,
char *  programName 
)

writes the values of all arguments, preceded by the programName

void printHelpMessage ( const char *  program,
Argument args,
bool  printDefaults = false 
)
Argument* findArgument ( Argument args,
char  c 
)
int getListArgs ( std::list< int > &  outlist,
std::string &  instring 
)

transforms a string list of ints to a list of int string "12,13,15" is turned into list of ints {12,13,15}

 

Parameters
outlistlist once converted
instringlist to be converted
Returns
status message.