55 out <<
"\nEntering someDumbFunction(...)\n";
57 out << std::endl << indentSpacer <<
"I am \"dumb\" code that knows nothing of FancyOStream and does indenting manually! ...\n";
59 out <<
"\nLeaving someDumbFunction(...)\n";
74 OSTab tab(out,1,
"LDUMBALGO");
75 *out <<
"\nEntering someLessDumbFunction(...)\n";
78 << std::endl <<
"I am less \"dumb\" code that knows about FancyOStream but my interface does not support it directly! ...\n";
80 << std::endl <<
"Another print from this less \"dumb\" code ...\n";
82 *out <<
"\nLeaving someLessDumbFunction(...)\n";
88const std::string AlgoType_name =
"Algo Type";
89const std::string AlgoType_default =
"Bob";
91const std::string AlgoTol_name =
"Algo Tol";
92const double AlgoTol_default = 1e-5;
177 if (is_null(validParams)) {
180 setStringToIntegralParameter<EAlgoType>(
181 AlgoType_name, AlgoType_default,
182 "The algorithm type to use",
183 tuple<std::string>(
"Bob",
"John",
"Harry"),
188 AlgoTol_name, AlgoTol_default,
189 "The tolerance for the algorithm.",
212 *out <<
"\nEntering AlgorithmA::doAlgorithm() with verbLevel="<<
Teuchos::toString(verbLevel)<<
"\n";
220 <<
"\nI am \"smart\" code that knows about FancyOStream and OSTab ...\n"
222 <<
"\nUsing tolerance of " <<
algoTol_ <<
"\n";
227 *out <<
"\n***\n*** Warning, I am doing something very dangerous so watch out!!!\n***\n";
230 *out <<
"\nHere I am doing some more stuff and printing with indenting turned back on!\n";
253 *out <<
"\nLeaving AlgorithmA::doAlgorithm()\n";
void someLessDumbFunction(std::ostream &out_arg)
void someDumbFunction(std::ostream &out, const std::string &indentSpacer)
void someLessDumbFunction(std::ostream &out_arg)
void someDumbFunction(std::ostream &out, const std::string &indentSpacer)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return a ParameterList containing all of the valid parameters that this->setParameterList(....
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const ¶mList)
Set parameters from a parameter list and return with default values.
Teuchos::RCP< Teuchos::ParameterList > paramList_
static const std::string toString(AlgorithmA::EAlgoType algoType)
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Unset the parameter list that was set using setParameterList().
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
Get const version of the parameter list that was set using setParameterList().
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Get a nonconst version of the parameter list that was set using setParameterList().
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
A list of parameters of arbitrary type.
IntegralType getIntegralValue(ParameterList const ¶mList, std::string const ¶mName)
Get an integral value for a parameter that is assumed to already be set.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void setDoubleParameter(std::string const ¶mName, double const &value, std::string const &docString, ParameterList *paramList, AnyNumberParameterEntryValidator::AcceptedTypes const &acceptedTypes=AnyNumberParameterEntryValidator::AcceptedTypes())
Set an double parameter that allows for (nearly) any input parameter type that is convertible to a do...
T & getParameter(ParameterList &l, const std::string &name)
A templated helper function for getting a parameter from a non-const list. This helper function preve...
void setStringToIntegralParameter(std::string const ¶mName, std::string const &defaultValue, std::string const &docString, ArrayView< const std::string > const &strings, ParameterList *paramList)
Set up a std::string parameter that will use an embedded validator to allow the extraction of an inte...
Smart reference counting pointer class for automatic garbage collection.
T * get() const
Get the raw C++ pointer to the underlying object.
Tuple< T, 1 > tuple(const T &a)
Create a Tuple<T,1>.
virtual RCP< FancyOStream > getOStream() const
Return the output stream to be used for out for *this object.
virtual OSTab getOSTab(const int tabs=1, const std::string &linePrefix="") const
Create a tab object which sets the number of tabs and optionally the line prefix.
virtual VerboseObjectBase & setLinePrefix(const std::string &linePrefix)
Set line prefix name for this object.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void readVerboseObjectSublist(ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
Read the parameters in the "VerboseObject" sublist and set them on the given VerboseObject.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void setupVerboseObjectSublist(ParameterList *paramList)
Setup a sublist called "VerboseObject" in the given parameter list.
virtual EVerbosityLevel getVerbLevel() const
RCP< basic_FancyOStream< CharT, Traits > > tab(const RCP< basic_FancyOStream< CharT, Traits > > &out, const int tabs=1, const std::basic_string< CharT, Traits > linePrefix="")
Create a tab for an RCP-wrapped basic_FancyOStream object to cause the indentation of all output auto...
RCP< basic_FancyOStream< char > > getFancyOStream(const RCP< std::basic_ostream< char > > &out)
Get a FancyOStream from an std::ostream object.
basic_FancyOStream< CharT, Traits > & o() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
basic_OSTab< char > OSTab
std::string toString(const HashSet< Key > &h)
EVerbosityLevel
Verbosity level.
@ VERB_LOW
Generate only a minimal amount of output.
basic_OSTab< char > OSTab