36template <
class ObjectType>
101 inline operator ObjectType*()
const noexcept {
return object.get(); }
174 std::swap (shouldDelete,
other.shouldDelete);
179 std::unique_ptr<ObjectType> object;
180 bool shouldDelete =
false;
void swapWith(OtherArrayType &otherArray) noexcept
OptionalScopedPointer(ObjectType *objectToHold, bool takeOwnership)
void setNonOwned(ObjectType *newObject)
void set(ObjectType *newObject, bool takeOwnership)
OptionalScopedPointer()=default
ObjectType * get() const noexcept
ObjectType & operator*() const noexcept
OptionalScopedPointer & operator=(OptionalScopedPointer &objectToTransferFrom)
ObjectType * release() noexcept
void setOwned(ObjectType *newObject)
OptionalScopedPointer(OptionalScopedPointer &objectToTransferFrom)
void swapWith(OptionalScopedPointer< ObjectType > &other) noexcept
bool willDeleteObject() const noexcept
ObjectType * operator->() const noexcept