Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / TransportCurrent / IIOP_Current_Impl.h
blobf74e7216f93075735dbf271afc9cbc105757cf0b
1 /**
2 * @file IIOP_Current_Impl.h
4 * @brief Provide implementation for the IIOPTraits interface
6 * @author Iliyan Jeliazkov <iliyan@ociweb.com>
7 */
9 #ifndef IIOP_CURRENT_IMPL_H
10 #define IIOP_CURRENT_IMPL_H
12 #include /**/ "ace/pre.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "tao/orbconf.h"
20 #if TAO_HAS_TRANSPORT_CURRENT == 1
22 #include "tao/TransportCurrent/TC_IIOPC.h"
23 #include "tao/TransportCurrent/Current_Impl.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 class TAO_Transport;
28 class TAO_IIOP_Connection_Handler;
30 namespace TAO
32 namespace Transport
34 /**
35 * @class IIOP_Current_Impl
37 * @brief Implementation of the TAO::Transport::IIOPCurrent
38 * interface.
40 * IIOP_Current_Impl is useful for obtaining information about the
41 * IIOP Transport, associated with the calling thread.
43 class TAO_Transport_Current_Export IIOP_Current_Impl
44 : public virtual IIOP::Current
45 , public virtual Current_Impl
47 public:
48 /// Constructor.
49 IIOP_Current_Impl (TAO_ORB_Core* core, size_t tss_slot_id);
51 //@{
52 virtual ::CORBA::Long id ();
54 virtual ::SSLIOP::Current_ptr ssliop_current ();
56 virtual ::CORBA::Long remote_port ();
58 virtual char* remote_host ();
60 virtual ::CORBA::Long local_port ();
62 virtual char* local_host ();
63 //@}
65 protected:
66 /// Destructor
67 /**
68 * Protected destructor to enforce the fact this class is reference
69 * counted, and should not be destroyed using delete() by anything
70 * other than the reference counting mechanism.
72 virtual ~IIOP_Current_Impl ();
74 private:
75 /// Returns the IIOP connection handler associated with the
76 /// Transport. Will throw NoContext if the (selected) transport
77 /// () == 0, or if transport->connection_handler () == 0. Will
78 /// throw NoContext, if no transport has been selected yet.
79 TAO_IIOP_Connection_Handler* handler ();
81 private:
82 IIOP_Current_Impl (const IIOP_Current_Impl &) = delete;
83 void operator= (const IIOP_Current_Impl &) = delete;
88 TAO_END_VERSIONED_NAMESPACE_DECL
90 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */
92 #include /**/ "ace/post.h"
94 #endif /* IIOP_CURRENT_IMPL_H */