4 * @author Jody Hagins <jody@atdesk.com>
5 * @author Carlos O'Ryan <coryan@uci.edu>
7 #ifndef TAO_PERF_RTEC_SERVANT_VAR_H
8 #define TAO_PERF_RTEC_SERVANT_VAR_H
10 #include "tao/corba.h"
15 * @brief Implement a smart pointer class for Servants
17 * All servants, are reference counted objects.
18 * Unfortunately the specification lacks such an useful smart pointer
19 * class to manage their life-cycle.
21 template<class SERVANT
>
27 * @param s The contained servant. The constructor assumes
30 explicit Servant_var (SERVANT
*s
= 0);
33 Servant_var (const Servant_var
<SERVANT
> &rhs
);
36 Servant_var
<SERVANT
>& operator= (const Servant_var
<SERVANT
> &rhs
);
39 Servant_var
<SERVANT
>& operator= (SERVANT
*s
);
44 /// Helper method to increase the reference count on a servant.
45 static SERVANT
*duplicate (SERVANT
*servart
);
48 /** @name Smart pointer operations
50 const SERVANT
* operator->() const;
51 SERVANT
* operator->();
54 operator const SERVANT
* () const;
58 /** @name Canonical CORBA T_var methods
70 #if defined(__ACE_INLINE__)
71 #include "Servant_var.inl"
72 #endif /* __ACE_INLINE__ */
74 #include "Servant_var.cpp"
76 #endif /* TAO_PERF_RTEC_SERVANT_VAR_H */