vrpn 07.35
Virtual Reality Peripheral Network
|
A shared pointer class for holding on to vrpn_Connection instances, using the existing "intrusive reference counting" automatically. More...
#include <vrpn_ConnectionPtr.h>
Public Member Functions | |
vrpn_ConnectionPtr (vrpn_Connection *c=NULL) | |
Explicit constructor from a non-smart connection pointer. | |
vrpn_ConnectionPtr (vrpn_ConnectionPtr const &other) | |
Copy constructor from smart pointer. | |
vrpn_ConnectionPtr & | operator= (vrpn_ConnectionPtr const &other) |
Assignment operator from smart pointer. | |
vrpn_ConnectionPtr & | operator= (vrpn_Connection *other) |
Assignment operator from non-smart pointer. | |
~vrpn_ConnectionPtr () | |
Destructor - decrements the contained reference count, if applicable. | |
void | reset () |
Clears the contained pointer and decrements the reference count, if applicable. | |
vrpn_Connection * | get () const |
Gets the contained "non-smart" pointer. You are responsible for calling vrpn_Connection::addReference() if you want to affect connection lifetime with this pointer! (Included VRPN devices take care of this by default) | |
bool | operator! () const |
Smart Pointer operators | |
vrpn_Connection & | operator* () |
vrpn_Connection const & | operator* () const |
vrpn_Connection * | operator-> () |
vrpn_Connection const * | operator-> () const |
Static Public Member Functions | |
Connection creation functions | |
Use these function, rather than initializing a vrpn_ConnectionPtr with results of vrpn_create_server_connection() - this will correctly handle the default reference added by the vrpn_create_server_connection() function. Identical signatures are provided for your convenience | |
static vrpn_ConnectionPtr | create_server_connection (int port=vrpn_DEFAULT_LISTEN_PORT_NO, const char *local_in_logfile_name=NULL, const char *local_out_logfile_name=NULL, const char *NIC_NAME=NULL) |
static vrpn_ConnectionPtr | create_server_connection (const char *cname, const char *local_in_logfile_name=NULL, const char *local_out_logfile_name=NULL) |
Related Symbols | |
(Note that these are not member symbols.) | |
bool | operator== (const vrpn_ConnectionPtr &lhs, const vrpn_ConnectionPtr &rhs) |
Equality operator for connection smart pointers. | |
bool | operator!= (const vrpn_ConnectionPtr &lhs, const vrpn_ConnectionPtr &rhs) |
Inequality operator for connection smart pointers. | |
Safe Bool Idiom | |
typedef vrpn_Connection *vrpn_ConnectionPtr::* | unspecified_bool_type |
operator unspecified_bool_type () const | |
A shared pointer class for holding on to vrpn_Connection instances, using the existing "intrusive reference counting" automatically.
Definition at line 34 of file vrpn_ConnectionPtr.h.
typedef vrpn_Connection* vrpn_ConnectionPtr::* vrpn_ConnectionPtr::unspecified_bool_type |
Definition at line 120 of file vrpn_ConnectionPtr.h.
|
inlineexplicit |
Explicit constructor from a non-smart connection pointer.
Definition at line 37 of file vrpn_ConnectionPtr.h.
References vrpn_Connection::addReference().
Referenced by create_server_connection(), and create_server_connection().
|
inline |
Copy constructor from smart pointer.
Definition at line 46 of file vrpn_ConnectionPtr.h.
References vrpn_Connection::addReference().
|
inline |
Destructor - decrements the contained reference count, if applicable.
Definition at line 87 of file vrpn_ConnectionPtr.h.
References reset().
|
inlinestatic |
Definition at line 146 of file vrpn_ConnectionPtr.h.
References vrpn_ConnectionPtr(), and vrpn_create_server_connection().
|
inlinestatic |
Definition at line 134 of file vrpn_ConnectionPtr.h.
References vrpn_ConnectionPtr(), and vrpn_create_server_connection().
|
inline |
Gets the contained "non-smart" pointer. You are responsible for calling vrpn_Connection::addReference() if you want to affect connection lifetime with this pointer! (Included VRPN devices take care of this by default)
Definition at line 103 of file vrpn_ConnectionPtr.h.
Referenced by operator!=(), and operator==().
|
inline |
Definition at line 121 of file vrpn_ConnectionPtr.h.
|
inline |
Definition at line 116 of file vrpn_ConnectionPtr.h.
|
inline |
Definition at line 107 of file vrpn_ConnectionPtr.h.
|
inline |
Definition at line 109 of file vrpn_ConnectionPtr.h.
|
inline |
Definition at line 111 of file vrpn_ConnectionPtr.h.
|
inline |
Definition at line 113 of file vrpn_ConnectionPtr.h.
|
inline |
Assignment operator from non-smart pointer.
self-assignment is a no-op
Definition at line 71 of file vrpn_ConnectionPtr.h.
References vrpn_Connection::addReference(), and reset().
|
inline |
Assignment operator from smart pointer.
self-assignment is a no-op
Definition at line 55 of file vrpn_ConnectionPtr.h.
References vrpn_Connection::addReference(), and reset().
|
inline |
Clears the contained pointer and decrements the reference count, if applicable.
Definition at line 91 of file vrpn_ConnectionPtr.h.
References vrpn_Connection::removeReference().
Referenced by operator=(), operator=(), and ~vrpn_ConnectionPtr().
|
related |
Inequality operator for connection smart pointers.
Definition at line 186 of file vrpn_ConnectionPtr.h.
References get().
|
related |
Equality operator for connection smart pointers.
Definition at line 178 of file vrpn_ConnectionPtr.h.
References get().