Struct ov::SoPtr

template<class T>
struct SoPtr

This class instantiate object using shared library.

Template Parameters

T – An type of object SoPtr can hold

Public Functions

SoPtr() = default

Default constructor.

inline ~SoPtr()

Destructor preserves unloading order of implementation object and reference to library.

inline SoPtr(const std::shared_ptr<T> &ptr, const std::shared_ptr<void> &so)

Constructs an object with existing shared object reference and loaded pointer.

Parameters
  • ptr – pointer to the loaded object

  • so – Existing reference to library

inline SoPtr(const std::shared_ptr<T> &ptr)

Constructs an object with existing shared object reference.

Parameters

ptr – pointer to the loaded object

template<class U, typename std::enable_if<std::is_base_of<T, U>::value, bool>::type = true>
inline SoPtr(const std::shared_ptr<U> &ptr)

Constructs an object with existing shared object reference.

Parameters

ptr – pointer to the loaded object

template<typename U>
inline SoPtr(const SoPtr<U> &that)

The copy-like constructor, can create So Pointer that dereferenced into child type if T is derived of U.

Parameters

that – copied SoPtr object

inline T *operator->() const noexcept

Standard pointer operator.

Returns

underlined interface with disabled Release method

Public Members

std::shared_ptr<T> _ptr

Gets a smart pointer to the custom object.

std::shared_ptr<void> _so

The shared object or dynamic loaded library.