Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / ORB_Holder.h
blob24640eae3dd4b19244368ea54e8b7488bc5fe0dc
1 /**
2 * @file ORB_Holder.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #ifndef TAO_PERF_RTEC_ORB_HOLDER_H
8 #define TAO_PERF_RTEC_ORB_HOLDER_H
10 #include "rtec_perf_export.h"
11 #include "tao/ORB.h"
13 #if !defined (ACE_LACKS_PRAGMA_ONCE)
14 # pragma once
15 #endif /* ACE_LACKS_PRAGMA_ONCE */
17 /**
18 * @class ORB_Holder
20 * @brief Implement a helper class to initialize and destroy an ORB.
22 class TAO_RTEC_Perf_Export ORB_Holder
24 public:
25 /// Constructor
26 ORB_Holder (int &argc, ACE_TCHAR *argv[],
27 const char *orb_id = 0);
29 /// Destructor
30 /**
31 * @todo This method could benefit from the error logging described
32 * in Servant_var.cpp
34 ~ORB_Holder ();
36 /// Access the underlying ORB, using the canonical CORBA memory
37 /// management model
38 CORBA::ORB_ptr orb ();
40 /// Implicit conversion to CORBA::ORB_ptr
41 /**
42 * It behaves as the .in() methods in the T_var classes.
44 operator CORBA::ORB_ptr () const;
46 /// Smart pointer behavior
47 CORBA::ORB_ptr operator-> () const;
49 private:
50 /// The ORB
51 CORBA::ORB_var orb_;
54 #if defined(__ACE_INLINE__)
55 #include "ORB_Holder.inl"
56 #endif /* __ACE_INLINE__ */
58 #endif /* TAO_PERF_RTEC_ORB_HOLDER_H */