#include <exception>
#include <Teuchos_Exceptions.hpp>
#include <Teuchos_Assert.hpp>
#include "Xpetra_ConfigDefs.hpp"
Go to the source code of this file.
| #define XPETRA_DYNAMIC_CAST |
( |
|
type, |
|
|
|
obj, |
|
|
|
newObj, |
|
|
|
exceptionMsg |
|
) |
| |
Value:type * newObj ## _pt = dynamic_cast<type *>(&obj); \
TEUCHOS_TEST_FOR_EXCEPTION(newObj ## _pt == NULL,
Xpetra::Exceptions::BadCast,
"Cannot cast '" #obj
"' to a " #type
". " #exceptionMsg); \
type & newObj = *newObj ## _pt;
Exception indicating invalid cast attempted.
Definition at line 57 of file Xpetra_Exceptions.hpp.
| #define XPETRA_RCP_DYNAMIC_CAST |
( |
|
type, |
|
|
|
obj, |
|
|
|
newObj, |
|
|
|
exceptionMsg |
|
) |
| |
Value:const RCP<type > & newObj = Teuchos::rcp_dynamic_cast<type >(obj); \
TEUCHOS_TEST_FOR_EXCEPTION(newObj == Teuchos::null,
Xpetra::Exceptions::BadCast,
"Cannot cast '" #obj
"' to a " #type
". " #exceptionMsg);
Exception indicating invalid cast attempted.
Definition at line 64 of file Xpetra_Exceptions.hpp.
| #define XPETRA_FACTORY_ERROR_IF_EPETRA |
( |
|
lib | ) |
|