Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_VerboseObjectParameterListHelpers.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef TEUCHOS_VERBOSE_OBJECT_PARAMETER_LIST_HELPERS_HPP
11 #define TEUCHOS_VERBOSE_OBJECT_PARAMETER_LIST_HELPERS_HPP
12 
15 
16 
17 namespace Teuchos {
18 
19 
28 TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP<const ParameterList> getValidVerboseObjectSublist();
29 
30 
43 TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void setupVerboseObjectSublist( ParameterList* paramList );
44 
68 TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void readVerboseObjectSublist(
69  ParameterList* paramList,
70  RCP<FancyOStream> *oStream, EVerbosityLevel *verbLevel
71  );
72 
73 
90 template<class ObjectType>
91 void readVerboseObjectSublist(
92  ParameterList* paramList, VerboseObject<ObjectType> *verboseObject
93  );
94 
95 
96 } // namespace Teuchos
97 
98 
99 // /////////////////////////////////
100 // Implementations
101 
102 
103 template<class ObjectType>
104 void Teuchos::readVerboseObjectSublist(
105  ParameterList* paramList, VerboseObject<ObjectType> *verboseObject
106  )
107 {
108  TEUCHOS_TEST_FOR_EXCEPT(0==paramList);
109  TEUCHOS_TEST_FOR_EXCEPT(0==verboseObject);
110  const EVerbosityLevel bogusVerbLevel = static_cast<EVerbosityLevel>(-50);
111  RCP<FancyOStream> oStream = null;
112  EVerbosityLevel verbLevel = bogusVerbLevel;
113  readVerboseObjectSublist(paramList,&oStream,&verbLevel);
114  verboseObject->setOverridingOStream(oStream);
115  verboseObject->setOverridingVerbLevel(verbLevel);
116 }
117 
118 
119 #endif // TEUCHOS_VERBOSE_OBJECT_PARAMETER_LIST_HELPERS_HPP
EVerbosityLevel
Verbosity level.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void readVerboseObjectSublist(ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
Read the parameters in the &quot;VerboseObject&quot; sublist and set them on the given VerboseObject.
Templated Parameter List class.
#define TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
#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...