commandline_processing.h File Reference

#include "setup.h"
#include <list>

Include dependency graph for commandline_processing.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CommandlineProcessing

Defines

#define Rose_STL_Container   std::vector

Functions

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[])
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.
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).
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'.
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)
std::string findRoseSupportPathFromSource (const std::string &sourceTreeLocation, const std::string &installTreeLocation)
 Find the path of a ROSE support file.
std::string findRoseSupportPathFromBuild (const std::string &buildTreeLocation, const std::string &installTreeLocation)
 Find the path of a ROSE support file.
bool roseInstallPrefix (std::string &result)
 Find the path of the ROSE install prefix.

Variables

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


Define Documentation

#define Rose_STL_Container   std::vector


Function Documentation

std::string findRoseSupportPathFromSource ( const std::string &  sourceTreeLocation,
const std::string &  installTreeLocation 
)

Find the path of a ROSE support file.

If ROSE is not installed (see roseInstallPrefix()), the top of the source tree plus sourceTreeLocation is used as the location. If the variable is not set, the path in installTreeLocation (with the install prefix added) is used instead.

std::string findRoseSupportPathFromBuild ( const std::string &  buildTreeLocation,
const std::string &  installTreeLocation 
)

Find the path of a ROSE support file.

If ROSE is not installed (see roseInstallPrefix()), the top of the build tree plus buildTreeLocation is used as the location. If the variable is not set, the path in installTreeLocation (with the install prefix added) is used instead.

bool roseInstallPrefix ( std::string &  result  ) 

Find the path of the ROSE install prefix.

There is an assumption that <directory containing="" librose>="">/.. is the prefix, and that other things can be found from that. This may not be true if the various install directories are set by hand (rather than from $prefix). This function either puts the prefix into RESULT and returns true (for an installed copy of ROSE), or returns false (for a build tree).


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