pdcomm::opcua::owned
Class
Move-only owner of one ::pdcomm_opcua_handle; base of every wrapper.
class ownedThe destructor and reset() release a non-zero handle with pdcomm_opcua_release(). A default-constructed or moved-from object is empty, and calling a member function on it throws error with #PDCOMM_OPCUA_INVALID_HANDLE.
Members
operator=
Method
Copy assignment is disabled: a handle has exactly one owner.
owned& operator=(const owned&) = deleteoperator=
Method
Releases the current handle, then takes ownership from other.
owned& operator=(owned&& other) noexceptParameters
| Name | Description |
|---|---|
other | Owner to move from; it becomes empty. |
Returns
This owner.
owned
Constructor
Creates an empty owner.
owned() noexcept = defaultowned
Constructor
Copying is disabled: a handle has exactly one owner.
owned(const owned&) = deleteowned
Constructor
Moves ownership; other becomes empty.
owned(owned&& other) noexceptParameters
| Name | Description |
|---|---|
other | Owner to move from. |
reset
Method
Releases the owned handle now and leaves the object empty.
void reset() noexceptFor an open client this aborts the socket without CloseSession; call client::close() first for an orderly shutdown.
~owned
Method
Releases the owned handle, if any.
~owned()