10 #include "Teuchos_VerbosityLevelCommandLineProcessorHelpers.hpp"
13 #include "Teuchos_Assert.hpp"
14 #include "Teuchos_implicit_cast.hpp"
24 const Array<Teuchos::EVerbosityLevel>
25 verbosityLevelValues = tuple<Teuchos::EVerbosityLevel>(
35 const Array<std::string>
36 verbosityLevelNamesStorage = tuple<std::string>(
46 Array<const char*> verbosityLevelNames;
54 void Teuchos::setVerbosityLevelOption(
55 const std::string &optionName,
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
Generate output as defined by the object.
Generate only a minimal amount of output.
Generate the most output possible.
EVerbosityLevel
Verbosity level.
std::string toString(const any &rhs)
Converts the value in any to a std::string.
Generate a high level of output.
TypeTo implicit_cast(const TypeFrom &t)
Perform an implicit cast of concrete types with the casted object returned by value.
Templated array class derived from the STL std::vector.
Basic command line parser for input from (argc,argv[])
#define TEUCHOS_ASSERT(assertion_test)
This macro is throws when an assert fails.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...