vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_MainloopObject Class Referenceabstract

An interface for all VRPN objects that have a "mainloop" method. Not instantiated directly: use vrpn_MainloopObject::wrap() to create one. More...

#include <vrpn_MainloopObject.h>

Inheritance diagram for vrpn_MainloopObject:

Classes

struct  CannotWrapNullPointerIntoMainloopObject
 Exception thrown when trying to wrap a NULL pointer. More...
 

Public Member Functions

virtual ~vrpn_MainloopObject ()
 Destructor.
 
virtual void mainloop ()=0
 The mainloop function: the primary thing we look for in a VRPN object.
 
virtual bool broken ()=0
 Checks the connectionPtr() for the VRPN object to make sure it is not NULL.
 

Static Public Member Functions

template<class T>
static vrpn_MainloopObjectwrap (T o)
 Templated wrapping function.
 
template<class T>
static vrpn_MainloopObjectwrap (T o, bool owner)
 Templated wrapping function that can encourage the wrapper to not destroy the wrapped object at destruction.
 

Protected Member Functions

virtual void * _returnContained () const =0
 Internal function to return a typeless pointer of the contained object, for comparison purposes.
 
 vrpn_MainloopObject ()
 

Friends

Comparison operators
bool operator== (vrpn_MainloopObject const &lhs, vrpn_MainloopObject const &rhs)
 
bool operator!= (vrpn_MainloopObject const &lhs, vrpn_MainloopObject const &rhs)
 

Detailed Description

An interface for all VRPN objects that have a "mainloop" method. Not instantiated directly: use vrpn_MainloopObject::wrap() to create one.

Definition at line 43 of file vrpn_MainloopObject.h.

Constructor & Destructor Documentation

◆ ~vrpn_MainloopObject()

virtual vrpn_MainloopObject::~vrpn_MainloopObject ( )
inlinevirtual

Destructor.

Definition at line 55 of file vrpn_MainloopObject.h.

◆ vrpn_MainloopObject()

vrpn_MainloopObject::vrpn_MainloopObject ( )
inlineprotected

Definition at line 75 of file vrpn_MainloopObject.h.

Referenced by broken(), operator!=, operator==, wrap(), and wrap().

Member Function Documentation

◆ _returnContained()

virtual void * vrpn_MainloopObject::_returnContained ( ) const
protectedpure virtual

Internal function to return a typeless pointer of the contained object, for comparison purposes.

Implemented in detail::TypedMainloopObject< T * >, detail::TypedMainloopObject< vrpn_Connection * >, and detail::TypedMainloopObject< vrpn_ConnectionPtr >.

Referenced by operator!=, and operator==.

◆ broken()

virtual bool vrpn_MainloopObject::broken ( )
pure virtual

Checks the connectionPtr() for the VRPN object to make sure it is not NULL.

Implemented in detail::TypedMainloopObject< T * >, detail::TypedMainloopObject< vrpn_Connection * >, and detail::TypedMainloopObject< vrpn_ConnectionPtr >.

References vrpn_MainloopObject().

Referenced by vrpn_MainloopContainer::add().

Here is the call graph for this function:

◆ mainloop()

virtual void vrpn_MainloopObject::mainloop ( )
pure virtual

The mainloop function: the primary thing we look for in a VRPN object.

Implemented in detail::TypedMainloopObject< T * >, detail::TypedMainloopObject< vrpn_Connection * >, and detail::TypedMainloopObject< vrpn_ConnectionPtr >.

◆ wrap() [1/2]

template<class T>
vrpn_MainloopObject * vrpn_MainloopObject::wrap ( T o)
inlinestatic

Templated wrapping function.

Definition at line 176 of file vrpn_MainloopObject.h.

References vrpn_MainloopObject().

Referenced by vrpn_MainloopContainer::add().

Here is the call graph for this function:

◆ wrap() [2/2]

template<class T>
vrpn_MainloopObject * vrpn_MainloopObject::wrap ( T o,
bool owner )
inlinestatic

Templated wrapping function that can encourage the wrapper to not destroy the wrapped object at destruction.

Definition at line 186 of file vrpn_MainloopObject.h.

References vrpn_MainloopObject().

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( vrpn_MainloopObject const & lhs,
vrpn_MainloopObject const & rhs )
friend

Definition at line 91 of file vrpn_MainloopObject.h.

References _returnContained(), operator!=, and vrpn_MainloopObject().

Referenced by operator!=.

◆ operator==

bool operator== ( vrpn_MainloopObject const & lhs,
vrpn_MainloopObject const & rhs )
friend

Definition at line 85 of file vrpn_MainloopObject.h.

References _returnContained(), operator==, and vrpn_MainloopObject().

Referenced by operator==.


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