MacStd
OS X API using Standard C++
Loading...
Searching...
No Matches
macstd::io_object< T > Class Template Reference

IOKit handle wrapper class. More...

#include <MacStd/IOKit.hpp>

Inheritance diagram for macstd::io_object< T >:
macstd::handle< T, 0 >

Public Member Functions

virtual ~io_object ()
 Releases an object handle.
 
- Public Member Functions inherited from macstd::handle< T, 0 >
 handle () noexcept
 Initializes a new class instance with the object handle set to INVAL.
 
 handle (T h) noexcept
 Initializes a new class instance with an already available object handle.
 
 handle (handle< T, INVAL > &&h) noexcept
 Move constructor.
 
handle< T, INVAL > & operator= (T h) noexcept
 Attaches already available object handle.
 
handle< T, INVAL > & operator= (handle< T, INVAL > &&h) noexcept
 Move assignment.
 
 operator T () const
 Auto-typecasting operator.
 
T *& operator* () const
 Returns the object handle value when the object handle is a pointer to a value (class, struct, etc.).
 
T * operator& ()
 Returns the object handle reference.
 
operator-> () const
 Provides object handle member access when the object handle is a pointer to a class or struct.
 
bool operator! () const
 Tests if the object handle is invalid.
 
bool operator< (T h) const
 Is handle less than?
 
bool operator<= (T h) const
 Is handle less than or equal to?
 
bool operator>= (T h) const
 Is handle greater than or equal to?
 
bool operator> (T h) const
 Is handle greater than?
 
bool operator!= (T h) const
 Is handle not equal to?
 
bool operator== (T h) const
 Is handle equal to?
 
void attach (T h) noexcept
 Sets a new object handle for the class.
 
detach ()
 Dismisses the object handle from this class.
 
void free ()
 Destroys the object.
 

Protected Member Functions

void free_internal () noexcept override
 Releases an object handle.
 
- Protected Member Functions inherited from macstd::handle< T, 0 >

Additional Inherited Members

- Protected Attributes inherited from macstd::handle< T, 0 >
m_h
 Object handle.
 

Detailed Description

template<typename T>
class macstd::io_object< T >

IOKit handle wrapper class.

Constructor & Destructor Documentation

◆ ~io_object()

template<typename T >
virtual macstd::io_object< T >::~io_object ( )
inlinevirtual

Releases an object handle.

See also
IOObjectRelease function

Member Function Documentation

◆ free_internal()

template<typename T >
void macstd::io_object< T >::free_internal ( )
inlineoverrideprotectedvirtualnoexcept

Releases an object handle.

See also
IOObjectRelease function

Implements macstd::handle< T, 0 >.


The documentation for this class was generated from the following file: