CommandlineProcessing Namespace Reference


Functions

Rose_STL_Container< std::string > generateArgListFromString (std::string commandline)
 Separate a string into individual parameters and store them into a string vector.
std::string generateStringFromArgList (const Rose_STL_Container< std::string > &argList)
 Convert a vector of string to a single string.
Rose_STL_Container< std::string > generateArgListFromArgcArgv (int argc, const char *argv[])
 Convert an argc-argv pair into a string vector.
Rose_STL_Container< std::string > generateArgListFromArgcArgv (int argc, char *argv[])
void generateArgcArgvFromList (Rose_STL_Container< std::string > argList, int &argc, char **&argv)
 Convert a string vector back to an argc-argv pair.
Rose_STL_Container< std::string > generateOptionList (Rose_STL_Container< std::string > &argList, std::string inputPrefix)
Rose_STL_Container< std::string > generateOptionWithNameParameterList (Rose_STL_Container< std::string > &argList, std::string inputPrefix)
 Find all options with a form like inputprefixoption from argList, strip off inputprefix: and return a string list for options only.
bool isOption (std::vector< std::string > &argv, std::string optionPrefix, std::string Option, bool removeOption)
 Search 'argv' for an option like optionPrefixOption, remove the option if 'removeOption' is true. e.g. isOption(argv,"-rose:","(C99|C99_only)",false).
bool isOptionWithParameter (std::vector< std::string > &argv, std::string optionPrefix, std::string Option, int &optionParameter, bool removeOption)
 Search 'argv' for 'optionPrefixOption value', store the integer value into 'optionParameter'.
bool isOptionWithParameter (std::vector< std::string > &argv, std::string optionPrefix, std::string Option, float &optionParameter, bool removeOption)
 Search 'argv' for 'optionPrefixOption value', store the float value into 'optionParameter'. Remove the original option if 'removeOption' is true.
bool isOptionWithParameter (std::vector< std::string > &argv, std::string optionPrefix, std::string Option, std::string &optionParameter, bool removeOption)
 Search 'argv' for 'optionPrefixOption value', store the string type value into 'optionParameter'. Remove the original option if 'removeOption' is true.
void addListToCommandLine (std::vector< std::string > &argv, std::string prefix, Rose_STL_Container< std::string > argList)
 Add the strings in argList to the command line represented by argc and argv, prepend 'prefix' to each of the arguments.
void removeArgs (std::vector< std::string > &argv, std::string prefix)
 Remove all options matching a specified prefix 'prefix' from the argument list 'argv'.
void removeArgsWithParameters (std::vector< std::string > &argv, std::string prefix)
 Remove all options matching a specified prefix 'prefix' from the argument list 'argv', as well as the option values following them.
void removeAllFileNamesExcept (std::vector< std::string > &argv, Rose_STL_Container< std::string > filenameList, std::string exceptFilename)
 Remove file names specified in filenameList from argv, except for 'exceptFilename'.
std::string generateStringFromArgList (Rose_STL_Container< std::string > argList, bool skipInitialEntry, bool skipSourceFiles)
 Build a string from the argList.
Rose_STL_Container< std::string > generateSourceFilenames (Rose_STL_Container< std::string > argList, bool binaryMode)
 Build the list of isolated file names from the command line.
void addSourceFileSuffix (const std::string &suffix)
 Add another valid source file suffix.
void addCppSourceFileSuffix (const std::string &suffix)
bool isSourceFilename (std::string name)
bool isObjectFilename (std::string name)
bool isExecutableFilename (std::string name)
bool isValidFileWithExecutableFileSuffixes (std::string name)
bool isCFileNameSuffix (const std::string &suffix)
bool isUPCFileNameSuffix (const std::string &suffix)
bool isCppFileNameSuffix (const std::string &suffix)
bool isFortranFileNameSuffix (const std::string &suffix)
bool isFortranFileNameSuffixRequiringCPP (const std::string &suffix)
bool isFortran77FileNameSuffix (const std::string &suffix)
bool isFortran90FileNameSuffix (const std::string &suffix)
bool isFortran95FileNameSuffix (const std::string &suffix)
bool isFortran2003FileNameSuffix (const std::string &suffix)
bool isFortran2008FileNameSuffix (const std::string &suffix)
bool isCoArrayFortranFileNameSuffix (const std::string &suffix)
bool isPHPFileNameSuffix (const std::string &suffix)
bool isPythonFileNameSuffix (const std::string &suffix)
bool isCudaFileNameSuffix (const std::string &suffix)
bool isOpenCLFileNameSuffix (const std::string &suffix)
bool isJavaFileNameSuffix (const std::string &suffix)
void initSourceFileSuffixList ()
void initObjectFileSuffixList ()
void initExecutableFileSuffixList ()
bool isOptionTakingSecondParameter (std::string argument)
bool isOptionTakingThirdParameter (std::string argument)

Variables

Rose_STL_Container< std::string > extraCppSourceFileSuffixes
static Rose_STL_Container<
std::string > 
validSourceFileSuffixes
static Rose_STL_Container<
std::string > 
validObjectFileSuffixes
static Rose_STL_Container<
std::string > 
validExecutableFileSuffixes


Function Documentation

Rose_STL_Container<std::string> CommandlineProcessing::generateArgListFromString ( std::string  commandline  ) 

Separate a string into individual parameters and store them into a string vector.

std::string CommandlineProcessing::generateStringFromArgList ( const Rose_STL_Container< std::string > &  argList  ) 

Convert a vector of string to a single string.

Rose_STL_Container<std::string> CommandlineProcessing::generateArgListFromArgcArgv ( int  argc,
const char *  argv[] 
)

Convert an argc-argv pair into a string vector.

Rose_STL_Container<std::string> CommandlineProcessing::generateArgListFromArgcArgv ( int  argc,
char *  argv[] 
) [inline]

void CommandlineProcessing::generateArgcArgvFromList ( Rose_STL_Container< std::string >  argList,
int &  argc,
char **&  argv 
)

Convert a string vector back to an argc-argv pair.

Rose_STL_Container<std::string> CommandlineProcessing::generateOptionList ( Rose_STL_Container< std::string > &  argList,
std::string  inputPrefix 
)

Rose_STL_Container<std::string> CommandlineProcessing::generateOptionWithNameParameterList ( Rose_STL_Container< std::string > &  argList,
std::string  inputPrefix 
)

Find all options with a form like inputprefixoption from argList, strip off inputprefix: and return a string list for options only.

All matching inputprefix:option in argList are also removed.

bool CommandlineProcessing::isOption ( std::vector< std::string > &  argv,
std::string  optionPrefix,
std::string  Option,
bool  removeOption 
)

Search 'argv' for an option like optionPrefixOption, remove the option if 'removeOption' is true. e.g. isOption(argv,"-rose:","(C99|C99_only)",false).

The argument 'option' adds () to the actual option, and allows the |(OR) operations.For example: CommandlineProcessing::isOption(argv,"-rose:","(skip_syntax_check)",true) CommandlineProcessing::isOption(argv,"-rose:","(C99|C99_only)",false)

bool CommandlineProcessing::isOptionWithParameter ( std::vector< std::string > &  argv,
std::string  optionPrefix,
std::string  Option,
int &  optionParameter,
bool  removeOption 
)

Search 'argv' for 'optionPrefixOption value', store the integer value into 'optionParameter'.

Remove the original option if 'removeOption' is true. Available value types are: str, float, double, int, short, long, unsigned int, unsigned short, unsigned long, char, etc.

bool CommandlineProcessing::isOptionWithParameter ( std::vector< std::string > &  argv,
std::string  optionPrefix,
std::string  Option,
float &  optionParameter,
bool  removeOption 
)

Search 'argv' for 'optionPrefixOption value', store the float value into 'optionParameter'. Remove the original option if 'removeOption' is true.

bool CommandlineProcessing::isOptionWithParameter ( std::vector< std::string > &  argv,
std::string  optionPrefix,
std::string  Option,
std::string &  optionParameter,
bool  removeOption 
)

Search 'argv' for 'optionPrefixOption value', store the string type value into 'optionParameter'. Remove the original option if 'removeOption' is true.

void CommandlineProcessing::addListToCommandLine ( std::vector< std::string > &  argv,
std::string  prefix,
Rose_STL_Container< std::string >  argList 
)

Add the strings in argList to the command line represented by argc and argv, prepend 'prefix' to each of the arguments.

void CommandlineProcessing::removeArgs ( std::vector< std::string > &  argv,
std::string  prefix 
)

Remove all options matching a specified prefix 'prefix' from the argument list 'argv'.

void CommandlineProcessing::removeArgsWithParameters ( std::vector< std::string > &  argv,
std::string  prefix 
)

Remove all options matching a specified prefix 'prefix' from the argument list 'argv', as well as the option values following them.

void CommandlineProcessing::removeAllFileNamesExcept ( std::vector< std::string > &  argv,
Rose_STL_Container< std::string >  filenameList,
std::string  exceptFilename 
)

Remove file names specified in filenameList from argv, except for 'exceptFilename'.

std::string CommandlineProcessing::generateStringFromArgList ( Rose_STL_Container< std::string >  argList,
bool  skipInitialEntry,
bool  skipSourceFiles 
)

Build a string from the argList.

Rose_STL_Container<std::string> CommandlineProcessing::generateSourceFilenames ( Rose_STL_Container< std::string >  argList,
bool  binaryMode 
)

Build the list of isolated file names from the command line.

void CommandlineProcessing::addSourceFileSuffix ( const std::string &  suffix  ) 

Add another valid source file suffix.

void CommandlineProcessing::addCppSourceFileSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isSourceFilename ( std::string  name  ) 

bool CommandlineProcessing::isObjectFilename ( std::string  name  ) 

bool CommandlineProcessing::isExecutableFilename ( std::string  name  ) 

bool CommandlineProcessing::isValidFileWithExecutableFileSuffixes ( std::string  name  ) 

bool CommandlineProcessing::isCFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isUPCFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isCppFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortranFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortranFileNameSuffixRequiringCPP ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortran77FileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortran90FileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortran95FileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortran2003FileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isFortran2008FileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isCoArrayFortranFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isPHPFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isPythonFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isCudaFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isOpenCLFileNameSuffix ( const std::string &  suffix  ) 

bool CommandlineProcessing::isJavaFileNameSuffix ( const std::string &  suffix  ) 

void CommandlineProcessing::initSourceFileSuffixList (  ) 

void CommandlineProcessing::initObjectFileSuffixList (  ) 

void CommandlineProcessing::initExecutableFileSuffixList (  ) 

bool CommandlineProcessing::isOptionTakingSecondParameter ( std::string  argument  ) 

bool CommandlineProcessing::isOptionTakingThirdParameter ( std::string  argument  ) 


Variable Documentation

Rose_STL_Container<std::string> CommandlineProcessing::extraCppSourceFileSuffixes

Rose_STL_Container<std::string> CommandlineProcessing::validSourceFileSuffixes [static]

Rose_STL_Container<std::string> CommandlineProcessing::validObjectFileSuffixes [static]

Rose_STL_Container<std::string> CommandlineProcessing::validExecutableFileSuffixes [static]


Generated on Tue Jan 31 05:46:12 2012 for ROSE by  doxygen 1.4.7