10#include "Teuchos_VerbosityLevelCommandLineProcessorHelpers.hpp"
13#include "Teuchos_Assert.hpp"
14#include "Teuchos_implicit_cast.hpp"
24const Array<Teuchos::EVerbosityLevel>
25verbosityLevelValues = tuple<Teuchos::EVerbosityLevel>(
35const Array<std::string>
36verbosityLevelNamesStorage = tuple<std::string>(
46Array<const char*> verbosityLevelNames;
55 const std::string &optionName,
56 EVerbosityLevel *verbLevel,
57 const std::string &docString,
58 CommandLineProcessor *clp,
62 const int numVerbLevels = implicit_cast<int>(verbosityLevelValues.size());
64 if ( !verbosityLevelNames.size() ) {
65 verbosityLevelNames = tuple<const char*>(
66 verbosityLevelNamesStorage[0].c_str(),
67 verbosityLevelNamesStorage[1].c_str(),
68 verbosityLevelNamesStorage[2].c_str(),
69 verbosityLevelNamesStorage[3].c_str(),
70 verbosityLevelNamesStorage[4].c_str(),
71 verbosityLevelNamesStorage[5].c_str()
79 TEUCHOS_ASSERT( implicit_cast<int>(verbosityLevelNamesStorage.size()) == numVerbLevels );
80 TEUCHOS_ASSERT( implicit_cast<int>(verbosityLevelNames.size()) == numVerbLevels );
83 optionName.c_str(), verbLevel,
84 numVerbLevels, &verbosityLevelValues[0], &verbosityLevelNames[0],
85 docString.c_str(), required
Templated array class derived from the STL std::vector.
Basic command line parser for input from (argc,argv[]).
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
void setVerbosityLevelOption(const std::string &optionName, EVerbosityLevel *verbLevel, const std::string &docString, CommandLineProcessor *clp, const bool required=false)
Set a verbosity level parameter on a CommandLineProcessor object..
Tuple< T, 1 > tuple(const T &a)
Create a Tuple<T,1>.
#define TEUCHOS_ASSERT(assertion_test)
This macro is throws when an assert fails.
@ VERB_MEDIUM
Generate more output.
@ VERB_HIGH
Generate a high level of output.
@ VERB_EXTREME
Generate the most output possible.
@ VERB_NONE
Generate no output.
@ VERB_DEFAULT
Generate output as defined by the object.
@ VERB_LOW
Generate only a minimal amount of output.