lsst.afw gba399f52f3+9b61cfce8e
Loading...
Searching...
No Matches
lsst::afw::typehandling::StorableHelper< Base > Class Template Reference

"Trampoline" for Storable to let it be used as a base class in Python. More...

#include <python.h>

Inheritance diagram for lsst::afw::typehandling::StorableHelper< Base >:
lsst::afw::detection::PsfTrampoline< Base >

Public Member Functions

template<typename... Args>
 StorableHelper (Args... args)
 Delegating constructor for wrapped class.
std::shared_ptr< Storable > cloneStorable () const override
std::string toString () const override
std::size_t hash_value () const override
bool equals (Storable const &other) const noexcept override
bool isPersistable () const noexcept override
std::string getPersistenceName () const override
std::string getPythonModule () const override
void write (table::io::OutputArchiveHandle &handle) const override

(Note that these are not member symbols.)

#define LSST_EXCEPTION_TYPE(t, b, c)

Detailed Description

template<class Base = Storable>
class lsst::afw::typehandling::StorableHelper< Base >

"Trampoline" for Storable to let it be used as a base class in Python.

Subclasses of Storable that are wrapped in pybind11 should have a similar helper that subclasses StorableHelper<subclass>. This helper can be skipped if the subclass neither adds any virtual methods nor implements any abstract methods.

Template Parameters
Basethe exact (most specific) class being wrapped
See also
pybind11 documentation

Definition at line 54 of file python.h.

Constructor & Destructor Documentation

◆ StorableHelper()

template<class Base = Storable>
template<typename... Args>
lsst::afw::typehandling::StorableHelper< Base >::StorableHelper ( Args... args)
inlineexplicit

Delegating constructor for wrapped class.

While we would like to simply inherit base class constructors, when doing so, we cannot change their access specifiers. One consequence is that it's not possible to use inheritance to expose a protected constructor to python. The alternative, used here, is to create a new public constructor that delegates to the base class public or protected constructor with the same signature.

Template Parameters
ArgsVariadic type specification
Parameters
...argsArguments to forward to the Base class constructor.

Definition at line 193 of file python.h.

Member Function Documentation

◆ cloneStorable()

template<class Base = Storable>
std::shared_ptr< Storable > lsst::afw::typehandling::StorableHelper< Base >::cloneStorable ( ) const
inlineoverride

Definition at line 73 of file python.h.

◆ equals()

template<class Base = Storable>
bool lsst::afw::typehandling::StorableHelper< Base >::equals ( Storable const & other) const
inlineoverridenoexcept

Definition at line 88 of file python.h.

◆ getPersistenceName()

template<class Base = Storable>
std::string lsst::afw::typehandling::StorableHelper< Base >::getPersistenceName ( ) const
inlineoverride

Definition at line 98 of file python.h.

◆ getPythonModule()

template<class Base = Storable>
std::string lsst::afw::typehandling::StorableHelper< Base >::getPythonModule ( ) const
inlineoverride

Definition at line 104 of file python.h.

◆ hash_value()

template<class Base = Storable>
std::size_t lsst::afw::typehandling::StorableHelper< Base >::hash_value ( ) const
inlineoverride

Definition at line 84 of file python.h.

◆ isPersistable()

template<class Base = Storable>
bool lsst::afw::typehandling::StorableHelper< Base >::isPersistable ( ) const
inlineoverridenoexcept

Definition at line 92 of file python.h.

◆ toString()

template<class Base = Storable>
std::string lsst::afw::typehandling::StorableHelper< Base >::toString ( ) const
inlineoverride

Definition at line 80 of file python.h.

◆ write()

template<typename Base>
void lsst::afw::typehandling::StorableHelper< Base >::write ( table::io::OutputArchiveHandle & handle) const
override

Definition at line 193 of file python.h.


The documentation for this class was generated from the following file: