Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
Teuchos_dyn_cast.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_dyn_cast.hpp"
11
#include "Teuchos_Assert.hpp"
12
17
void
Teuchos::dyn_cast_throw_exception
(
18
const
std::string &T_from,
19
const
std::string &T_from_concr,
20
const
std::string &T_to
21
)
22
{
23
TEUCHOS_TEST_FOR_EXCEPTION
(
24
true
,
m_bad_cast
25
,
"dyn_cast<"
<< T_to <<
">("
<< T_from
26
<<
") : Error, the object with the concrete type \'"
27
<< T_from_concr <<
"\' (passed in through the interface type \'"
<< T_from <<
"\') "
28
" does not support the interface \'"
29
<< T_to <<
"\' and the dynamic cast failed!"
);
30
}
Teuchos::m_bad_cast
Exception class for bad cast.
Definition
Teuchos_dyn_cast.hpp:28
TEUCHOS_TEST_FOR_EXCEPTION
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
Definition
Teuchos_TestForException.hpp:146
Teuchos::dyn_cast_throw_exception
TEUCHOSCORE_LIB_DLL_EXPORT void dyn_cast_throw_exception(const std::string &T_from, const std::string &T_from_concr, const std::string &T_to)
Definition
Teuchos_dyn_cast.cpp:17
Generated by
1.17.0