OSVR-Core
Public Member Functions | List of all members
osvr::util::GuardInterface Class Referenceabstract

An interface to a (deferred) guard class: after instantiation and lock returning true, some resource is locked and available until destruction. More...

#include <GuardInterface.h>

Inheritance diagram for osvr::util::GuardInterface:
osvr::connection::AsyncSendGuard osvr::util::DummyGuard

Public Member Functions

virtual OSVR_RETURN_WARN_UNUSED bool lock ()=0
 Attempts to lock/request the resource, and returns true if successful. More...
 

Detailed Description

An interface to a (deferred) guard class: after instantiation and lock returning true, some resource is locked and available until destruction.

Member Function Documentation

§ lock()

virtual OSVR_RETURN_WARN_UNUSED bool osvr::util::GuardInterface::lock ( )
pure virtual

Attempts to lock/request the resource, and returns true if successful.

Only proceed with using the resource if this returns true!

Implemented in osvr::connection::AsyncSendGuard, and osvr::util::DummyGuard.


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