LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
31 namespace typehandling {
40 : _value(
other._value ?
other._value->cloneStorable() :
nullptr) {}
45 _value =
other._value->cloneStorable();
64 PolymorphicValue::operator
Storable&() {
return get(); }
65 PolymorphicValue::operator
Storable const&()
const {
return get(); }
79 if (!empty() && !
other.empty()) {
80 return get().equals(
other.get());
83 return _value ==
other._value;
bool empty() const noexcept
Check whether this object contains a Storable.
Interface supporting iteration over heterogenous containers.
void swap(PolymorphicValue &other) noexcept
Exchange the contents of this container and another.
PolymorphicValue(Storable const &value)
Create a new object containing a copy of a Storable.
bool operator==(PolymorphicValue const &other) const noexcept
Test whether the contained Storables are equal.
~PolymorphicValue() noexcept
ItemVariant const * other
Reports errors in the logical structure of the program.
PolymorphicValue & operator=(PolymorphicValue const &other)
Try to assign a PolymorphicValue.
void swap(PolymorphicValue &lhs, PolymorphicValue &rhs) noexcept
Swap specialization for PolymorphicValue.
Container that passes Storable objects by value while preserving type.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Storable & get()
Return a reference to the internal Storable, if one exists.
std::size_t hash_value() const
Return a hash of this object (optional operation).