Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
parameterlist
src
Teuchos_ParameterListNonAcceptor.cpp
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
#include "Teuchos_ParameterListNonAcceptor.hpp"
11
#include "
Teuchos_ParameterList.hpp
"
12
13
namespace
Teuchos
{
14
15
16
// Overridden from ParameterListAcceptor
17
18
19
void
ParameterListNonAcceptor::setParameterList
(
20
RCP<ParameterList>
const
& paramList
21
)
22
{
23
TEUCHOS_TEST_FOR_EXCEPT
(
is_null
(paramList));
24
paramList->validateParameters(*this->
getValidParameters
());
25
setMyParamList
(paramList);
26
}
27
28
29
RCP<const ParameterList>
30
ParameterListNonAcceptor::getValidParameters
()
const
31
{
32
static
RCP<const ParameterList>
validPL;
33
if
(
is_null
(validPL)) {
34
validPL =
parameterList
();
35
}
36
return
validPL;
37
}
38
39
40
}
// end namespace Teuchos
Teuchos_ParameterList.hpp
Templated Parameter List class.
Teuchos::ParameterListAcceptorDefaultBase::setMyParamList
void setMyParamList(const RCP< ParameterList > ¶mList)
Definition
Teuchos_ParameterListAcceptorDefaultBase.hpp:73
Teuchos::ParameterList::parameterList
RCP< ParameterList > parameterList()
Nonmember constructor.
Definition
Teuchos_ParameterList.hpp:793
Teuchos::ParameterListNonAcceptor::setParameterList
void setParameterList(RCP< ParameterList > const ¶mList)
Accepts a parameter list but asserts that it is empty.
Definition
Teuchos_ParameterListNonAcceptor.cpp:19
Teuchos::ParameterListNonAcceptor::getValidParameters
RCP< const ParameterList > getValidParameters() const
Returns a non-null but empty parameter list.
Definition
Teuchos_ParameterListNonAcceptor.cpp:30
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
TEUCHOS_TEST_FOR_EXCEPT
#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.
Definition
Teuchos_TestForException.hpp:285
Teuchos::is_null
bool is_null(const std::shared_ptr< T > &p)
Returns true if p.get()==NULL.
Definition
Teuchos_RCPStdSharedPtrConversionsDecl.hpp:116
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0