Provides a type safe counted reference to servants.
More...
#include <Servant_var.h>
List of all members.
Detailed Description
template<class T>
class PortableServer::Servant_var< T >
Provides a type safe counted reference to servants.
- Author:
- Jody Hagins
- Todo:
- Life would be much easier if _add_ref() and _remove_ref() had throw specs of "throw ()", that can be hidden in static methods though.
Member Typedef Documentation
Constructor & Destructor Documentation
Constructor. Assumes ownership of p
.
Copy constructor. Adds reference to rhs
.
Destructor. Removes a reference from the underlying object, possibly destroying it. This destructor doesn't throw exceptions.
Member Function Documentation
Increment the reference count and return the servant.
It is safe to pass in a null pointer, the pointer is simply returned in that case.
- Todo:
- We might want to catch all (potential) exceptions in _add_ref().
- Todo:
- It might be useful to add a _release() method that handles any potential exceptions...
Return a pointer to the underlying object, and this counted reference will no longer own the object.
Return a void pointer to the underlying object. This allows it to be used in conditional code and tested against 0.
Dereference the underlying object.
Dereference the underlying object.
Smart pointer operator-> provides access to the underlying object.
Assignment operator. Assumes ownership of p
.
Assignment operator. Adds reference to rhs
.
Swap the contents of a Servant_var<T> with another Servant_var<T> Non-throwing swap operation. Often used to implement strong exception safety.
Member Data Documentation
The documentation for this class was generated from the following files: