xentara-utils v2.1
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::windows::Sid::OwnerSid Class Referencefinal

#include <xentara/utils/windows/Sid.hpp>

+ Inheritance diagram for xentara::utils::windows::Sid::OwnerSid:

Public Member Functions

 OwnerSid () noexcept
 Default constructor.
 
 OwnerSid (OwnerSid &&other) noexcept
 Move constructor.
 
auto operator= (OwnerSid &&rhs) noexcept -> OwnerSid &
 Move assignment operator.
 
 operator PSID () const
 Conversion to a native SID pointer.
 
 operator bool () const noexcept
 Checks whether the object contains an SID.
 

Constructor & Destructor Documentation

◆ OwnerSid() [1/2]

xentara::utils::windows::Sid::OwnerSid::OwnerSid ( )
noexcept

Default constructor.

Creates an empty object that does not contain an SID.

◆ OwnerSid() [2/2]

xentara::utils::windows::Sid::OwnerSid::OwnerSid ( OwnerSid &&  other)
noexcept

Move constructor.

Takes ownership of the other object’s SID, if any.

Parameters
otherThe object to move. Will be reset and no longer contain an SID afterwards.

Member Function Documentation

◆ operator bool()

xentara::utils::windows::Sid::OwnerSid::operator bool ( ) const
explicitnoexcept

Checks whether the object contains an SID.

◆ operator PSID()

xentara::utils::windows::Sid::OwnerSid::operator PSID ( ) const

Conversion to a native SID pointer.

Returns
The contained SID, or nullptr for none.

◆ operator=()

auto xentara::utils::windows::Sid::OwnerSid::operator= ( OwnerSid &&  rhs) -> OwnerSid &
noexcept

Move assignment operator.

Takes ownership of the other SID’s value. Any existing SID pointer is freed.

Parameters
rhsThe object to move. Will be reset and no longer contain an SID afterwards.