#include <exception>
#include <Teuchos_Exceptions.hpp>
#include <Teuchos_Assert.hpp>
#include "Xpetra_ConfigDefs.hpp"
Go to the source code of this file.
|
#define | COMMA , |
|
#define | XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg) |
|
#define | XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg) |
|
#define | XPETRA_FACTORY_ERROR_IF_EPETRA(lib) |
|
#define | XPETRA_FACTORY_END TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Unknown map->lib() type. Did you compile with Epetra and Tpetra support?"); |
|
#define | XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go) TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Problem in " #cl "! Cannot create new object " #obj " with GO=" #go ". Xpetra has been compiled with Tpetra enabled but GO!=" #go ". Please add TPETRA_INST_INT_INT to your configuration."); |
|
#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 58 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 65 of file Xpetra_Exceptions.hpp.
#define XPETRA_FACTORY_ERROR_IF_EPETRA |
( |
|
lib | ) |
|
Value: TEUCHOS_TEST_FOR_EXCEPTION(1, ::
Xpetra::Exceptions::BadCast,
"Epetra can only be used with Scalar=double and LocalOrdinal=GlobalOrdinal=int on a serial node");
Exception indicating invalid cast attempted.
Definition at line 70 of file Xpetra_Exceptions.hpp.
#define XPETRA_TPETRA_ETI_EXCEPTION |
( |
|
cl, |
|
|
|
obj, |
|
|
|
go |
|
) |
| TEUCHOS_TEST_FOR_EXCEPTION(1, ::Xpetra::Exceptions::BadCast, "Problem in " #cl "! Cannot create new object " #obj " with GO=" #go ". Xpetra has been compiled with Tpetra enabled but GO!=" #go ". Please add TPETRA_INST_INT_INT to your configuration."); |