OSVR-Core
Public Member Functions | Protected Member Functions | List of all members
OSVR_ClientInterfaceObject Struct Reference
Inheritance diagram for OSVR_ClientInterfaceObject:

Public Member Functions

OSVR_COMMON_EXPORT std::string const & getPath () const
 Get the path as a string.
 
void update ()
 Update any state.
 
osvr::common::ClientContextgetContext () const
 
boost::any & data ()
 Access the type-erased data for this interface.
 
State-related wrapper methods

Primarily forwarding to the nested InterfaceState instance.

If state exists for the given ReportType on this interface, it will be returned in the arguments, and true will be returned.

template<typename ReportType >
bool getState (osvr::util::time::TimeValue &timestamp, osvr::common::traits::StateFromReport_t< ReportType > &state) const
 
template<typename ReportType >
bool hasStateForReportType () const
 
bool hasAnyState () const
 
template<typename ReportType >
void setState (const OSVR_TimeValue &timestamp, ReportType const &report)
 Set saved state for a report type.
 
Callback-related wrapper methods

Primarily forwarding to the nested InterfaceCallbacks instance.

Register a callback for a known report type.

template<typename CallbackType >
void registerCallback (CallbackType cb, void *userdata)
 
template<typename ReportType >
void triggerCallbacks (const OSVR_TimeValue &timestamp, ReportType const &report)
 Trigger all callbacks for the given known report type. More...
 
template<typename ReportType >
std::size_t getNumCallbacksFor (ReportType const &r) const
 Get the number of registered callbacks for the given report type.
 

Protected Member Functions

OSVR_COMMON_EXPORT OSVR_ClientInterfaceObject (osvr::common::ClientContext &ctx, std::string const &path)
 Constructor - only to be called by a factory function.
 

Member Function Documentation

§ triggerCallbacks()

template<typename ReportType >
void OSVR_ClientInterfaceObject::triggerCallbacks ( const OSVR_TimeValue timestamp,
ReportType const &  report 
)
inline

Trigger all callbacks for the given known report type.


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