OSVR-Core
Public Types | Public Member Functions | Protected Member Functions | List of all members
osvr::common::DeviceComponent Class Referenceabstract
Inheritance diagram for osvr::common::DeviceComponent:
osvr::common::CommonComponent osvr::common::DirectionComponent osvr::common::EyeTrackerComponent osvr::common::ImagingComponent osvr::common::Location2DComponent osvr::common::LocomotionComponent osvr::common::SkeletonComponent osvr::common::SystemComponent

Public Types

typedef BaseDevice Parent
 

Public Member Functions

void recordParent (Parent &dev)
 Called (only) by BaseDevice when being added: effectively records a "parent pointer" that does not convey ownership. More...
 
void update ()
 Called during mainloop.
 

Protected Member Functions

 DeviceComponent ()
 Protected constructor, to require subclassing.
 
bool m_hasParent () const
 Returns true if we have a parent registered.
 
Parentm_getParent ()
 Gets the parent - only call if m_hasParent() is true.
 
void m_registerHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType)
 Registers a handler whose lifetime is tied to the lifetime of the component. More...
 
virtual void m_parentSet ()=0
 Called once when we have a parent.
 
virtual void m_update ()
 Implementation-specific (optional) stuff to do during mainloop.
 

Member Function Documentation

§ m_registerHandler()

void osvr::common::DeviceComponent::m_registerHandler ( vrpn_MESSAGEHANDLER  handler,
void *  userdata,
RawMessageType const &  msgType 
)
protected

Registers a handler whose lifetime is tied to the lifetime of the component.

Only call if m_hasParent() is true.

Your handler should return 0 unless something is horribly wrong.

§ recordParent()

void osvr::common::DeviceComponent::recordParent ( Parent dev)

Called (only) by BaseDevice when being added: effectively records a "parent pointer" that does not convey ownership.


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