Class interface_t#
Defined in File interface.h
Class Documentation#
-
class interface_t#
Interface type class.
Public Functions
-
interface_t() noexcept#
Default constructor.
-
interface_t(const interface_t &rifc) noexcept#
Copy constructor.
- Parameters:
rifc – [in] Reference to the interface to copy the pointer from.
-
interface_t(interface_t &&rifc) noexcept#
Move constructor.
- Parameters:
rifc – [in] Reference to the interface to move the pointer from.
-
interface_t(std::nullptr_t) noexcept#
Null-pointer constructor.
-
template<typename TInterface>
interface_t(TInterface *pInterface) noexcept# Assignment constructor.
- Template Parameters:
TInterface – Interface type
- Parameters:
pInterface – [in] Interface pointer
-
interface_t &operator=(const interface_t &rifc) noexcept#
Copy assignment.
- Parameters:
rifc – [in] Reference to the interface to copy the pointer from.
- Returns:
Reference to this interface type.
-
interface_t &operator=(interface_t &&rifc) noexcept#
Move assignment.
- Parameters:
rifc – [in] Reference to the interface to move the pointer from.
- Returns:
Reference to this interface type.
-
interface_t &operator=(std::nullptr_t) noexcept#
Null-pointer assignment.
- Returns:
Reference to this interface type.
-
template<typename TInterface>
interface_t &operator=(TInterface *pInterface) noexcept# Interface assignment operator.
- Template Parameters:
TInterface – Interface type
- Parameters:
pInterface – [in] Interface pointer
- Returns:
Reference to this interface type.
-
operator bool() const noexcept#
Boolean cast operator. Returns whether an interface (!= nullptr) has been assigned.
- Returns:
Returns ‘true’ when assigned; ‘false’ when not.
-
void reset() noexcept#
Reset the interface pointer.
-
interface_id id() const noexcept#
Get the interface ID.
- Returns:
The ID of the stored interface.
-
template<typename TInterface>
TInterface *get() noexcept# Get a pointer to the stored interface.
- Template Parameters:
TInterface – The interface to get the pointer for.
- Returns:
Returns the stored interface pointer if the ID of the requested interface corresponds to the stored interface. Returns a NULL-pointer if not.
-
template<typename TInterface>
const TInterface *get() const noexcept# Get a pointer to the stored interface.
- Template Parameters:
TInterface – The interface to get the pointer for.
- Returns:
Returns the stored interface pointer if the ID of the requested interface corresponds to the stored interface. Returns a NULL-pointer if not.
-
int compare(const interface_t &rifc) const noexcept#
Compare the interface with another interface.
- Parameters:
rifc – [in] Reference to the interface to compare with.
- Returns:
Returns negative when the stored interface is smaller, 0 when the interfaces are equal and positive when the stored interface is larger.
-
interface_t() noexcept#