lsst.afw
21.0.0-7-g484459ba0+d6ece73efd
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
std::shared_ptr
STL class.
Persistable.h
result
std::unique_ptr< SchemaItem< U > > result
Definition:
Schema.cc:195
lsst
A base class for image defects.
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
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
Generated on Thu Dec 17 2020 02:19:13 for lsst.afw by
1.8.18