lsst.afw
g1b7e58284d+42a83f9714
Loading...
Searching...
No Matches
include
lsst
afw
table
io
Persistable.cc
Go to the documentation of this file.
1
#include <memory>
2
3
#include "
lsst/afw/table/io/Persistable.h
"
4
5
namespace
lsst
{
6
namespace
afw {
7
namespace
table {
8
namespace
io {
9
17
template
<
typename
T>
18
std::shared_ptr<T>
PersistableFacade<T>::dynamicCast
(
std::shared_ptr<Persistable>
const
&ptr) {
19
auto
result = std::dynamic_pointer_cast<T>(ptr);
20
if
(!result) {
21
throw
LSST_EXCEPT
(
pex::exceptions::TypeError
,
"Dynamic pointer cast failed"
);
22
}
23
return
result;
24
}
25
26
}
// namespace io
27
}
// namespace table
28
}
// namespace afw
29
}
// namespace lsst
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Persistable.h
lsst::afw::table::io::PersistableFacade::dynamicCast
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr.
Definition:
Persistable.cc:18
lsst::pex::exceptions::TypeError
lsst
std::shared_ptr
Generated on Wed May 3 2023 02:47:36 for lsst.afw by
1.9.5