ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
commandline_processing.h File Reference
#include "setup.h"
#include "rosedll.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

 CommandlineProcessing
 

Constant Groups

 CommandlineProcessing
 

Macros

#define Rose_STL_Container   std::vector
 

Functions

ROSE_UTIL_API
Rose_STL_Container
< std::string > 
CommandlineProcessing::generateArgListFromString (std::string commandline)
 Separate a string into individual parameters and store them into a string vector. More...
 
ROSE_UTIL_API std::string CommandlineProcessing::generateStringFromArgList (const Rose_STL_Container< std::string > &argList)
 Convert a vector of string to a single string. More...
 
ROSE_UTIL_API
Rose_STL_Container
< std::string > 
CommandlineProcessing::generateArgListFromArgcArgv (int argc, const char *argv[])
 Convert an argc-argv pair into a string vector. More...
 
Rose_STL_Container< std::string > CommandlineProcessing::generateArgListFromArgcArgv (int argc, char *argv[])
 
ROSE_UTIL_API void CommandlineProcessing::generateArgcArgvFromList (Rose_STL_Container< std::string > argList, int &argc, char **&argv)
 Convert a string vector back to an argc-argv pair. More...
 
ROSE_UTIL_API
Rose_STL_Container
< std::string > 
CommandlineProcessing::generateOptionList (const Rose_STL_Container< std::string > &argList, std::string inputPrefix)
 Looks for inputPrefix prefixed options. More...
 
ROSE_UTIL_API
Rose_STL_Container
< std::string > 
CommandlineProcessing::generateOptionListWithDeclaredParameters (const Rose_STL_Container< std::string > &argList, std::string inputPrefix)
 Looks for inputPrefix-prefixed options. More...
 
ROSE_UTIL_API
Rose_STL_Container
< std::string > 
CommandlineProcessing::generateOptionWithNameParameterList (Rose_STL_Container< std::string > &argList, std::string inputPrefix, std::string newPrefix="")
 Find all options matching 'inputPrefix:optionName' || 'inputPrefix:optionName optionValue' from argList, strip off 'inputPrefix:' or replace it by 'newPrefix' if provided. More...
 
ROSE_UTIL_API 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) More...
 
ROSE_UTIL_API 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'. More...
 
ROSE_UTIL_API 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. More...
 
ROSE_DLL_API 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. More...
 
ROSE_UTIL_API 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. More...
 
ROSE_UTIL_API void CommandlineProcessing::removeArgs (std::vector< std::string > &argv, std::string prefix)
 Remove all options matching a specified prefix 'prefix' from the argument list 'argv'. More...
 
ROSE_UTIL_API 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. More...
 
ROSE_UTIL_API 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'. More...
 
ROSE_UTIL_API std::string CommandlineProcessing::generateStringFromArgList (Rose_STL_Container< std::string > argList, bool skipInitialEntry, bool skipSourceFiles)
 Build a string from the argList. More...
 
ROSE_DLL_API
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. More...
 
ROSE_UTIL_API void CommandlineProcessing::addSourceFileSuffix (const std::string &suffix)
 Add another valid source file suffix. More...
 
ROSE_UTIL_API void CommandlineProcessing::addCppSourceFileSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isSourceFilename (std::string name)
 
ROSE_UTIL_API bool CommandlineProcessing::isObjectFilename (std::string name)
 
ROSE_DLL_API bool CommandlineProcessing::isExecutableFilename (std::string name)
 
ROSE_DLL_API bool CommandlineProcessing::isValidFileWithExecutableFileSuffixes (std::string name)
 
ROSE_UTIL_API bool CommandlineProcessing::isCFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isUPCFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isCppFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortranFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortranFileNameSuffixRequiringCPP (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortran77FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortran90FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortran95FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortran2003FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isFortran2008FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isCoArrayFortranFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isPHPFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isPythonFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isCudaFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isOpenCLFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isJavaFileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API bool CommandlineProcessing::isX10FileNameSuffix (const std::string &suffix)
 
ROSE_UTIL_API void CommandlineProcessing::initSourceFileSuffixList ()
 
ROSE_UTIL_API void CommandlineProcessing::initObjectFileSuffixList ()
 
ROSE_DLL_API void CommandlineProcessing::initExecutableFileSuffixList ()
 
ROSE_DLL_API bool CommandlineProcessing::isOptionTakingSecondParameter (std::string argument)
 
ROSE_DLL_API bool CommandlineProcessing::isOptionTakingThirdParameter (std::string argument)
 
ROSE_DLL_API std::string findRoseSupportPathFromSource (const std::string &sourceTreeLocation, const std::string &installTreeLocation)
 Find the path of a ROSE support file. More...
 
ROSE_DLL_API std::string findRoseSupportPathFromBuild (const std::string &buildTreeLocation, const std::string &installTreeLocation)
 Find the path of a ROSE support file. More...
 
ROSE_DLL_API bool roseInstallPrefix (std::string &result)
 Find the path of the ROSE install prefix. More...
 

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
 

Macro Definition Documentation

#define Rose_STL_Container   std::vector

Definition at line 7 of file commandline_processing.h.

Function Documentation

ROSE_DLL_API 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.

ROSE_DLL_API 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.

ROSE_DLL_API 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).