vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file.
19 #ifndef INCLUDED_vrpn_MainloopObject_h_GUID_38f638e4_40e0_4c6d_bebc_21c463794b88
20 #define INCLUDED_vrpn_MainloopObject_h_GUID_38f638e4_40e0_4c6d_bebc_21c463794b88
31 #ifdef VRPN_MAINLOOPOBJECT_VERBOSE
33 #define VRPN_MAINLOOPOBJECT_MSG(_x) \
34 std::cout << __FILE__ << ":" << __LINE__ << ": " << _x << std::endl;
36 #define VRPN_MAINLOOPOBJECT_MSG(_x)
49 "Cannot wrap a null pointer into a vrpn_MainloopObject!")
100 template <
class T>
class TypedMainloopObject;
109 , _do_delete(do_delete)
112 throw vrpn_MainloopObject::
113 CannotWrapNullPointerIntoMainloopObject();
132 virtual bool broken() {
return (_instance->connectionPtr() == NULL); }
148 throw vrpn_MainloopObject::
149 CannotWrapNullPointerIntoMainloopObject();
157 _instance->removeReference();
162 virtual bool broken() {
return (!_instance->doing_okay()); }
182 #endif // INCLUDED_vrpn_MainloopObject_h_GUID_38f638e4_40e0_4c6d_bebc_21c463794b88
virtual void mainloop()
The mainloop function: the primary thing we look for in a VRPN object.
An interface for all VRPN objects that have a "mainloop" method. Not instantiated directly: use vrpn_...
CannotWrapNullPointerIntoMainloopObject()
vrpn_Connection * _instance
virtual ~vrpn_MainloopObject()
Destructor.
friend bool operator==(vrpn_MainloopObject const &lhs, vrpn_MainloopObject const &rhs)
Namespace enclosing internal implementation details.
bool operator==(const vrpn_ConnectionPtr &lhs, const vrpn_ConnectionPtr &rhs)
Equality operator for connection smart pointers.
friend bool operator!=(vrpn_MainloopObject const &lhs, vrpn_MainloopObject const &rhs)
static vrpn_MainloopObject * wrap(T o)
Templated wrapping function.
virtual void * _returnContained() const =0
Internal function to return a typeless pointer of the contained object, for comparison purposes.
virtual bool broken()=0
Checks the connectionPtr() for the VRPN object to make sure it is not NULL.
bool operator!=(const vrpn_ConnectionPtr &lhs, const vrpn_ConnectionPtr &rhs)
Inequality operator for connection smart pointers.
virtual void mainloop()=0
The mainloop function: the primary thing we look for in a VRPN object.
Generic connection class not specific to the transport mechanism.
virtual void * _returnContained() const
Internal function to return a typeless pointer of the contained object, for comparison purposes.
virtual bool broken()
Checks the connectionPtr() for the VRPN object to make sure it is not NULL.
virtual ~TypedMainloopObject()
virtual ~TypedMainloopObject()
TypedMainloopObject(vrpn_Connection *o)
virtual bool broken()
Checks the connectionPtr() for the VRPN object to make sure it is not NULL.
TypedMainloopObject(T *o, bool do_delete=true)
#define VRPN_MAINLOOPOBJECT_MSG(_x)
virtual void * _returnContained() const
Internal function to return a typeless pointer of the contained object, for comparison purposes.
virtual void mainloop()
The mainloop function: the primary thing we look for in a VRPN object.
Exception thrown when trying to wrap a NULL pointer.