Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Strategies / UIOP_Endpoint.h
blob80d8af174d18151124d0485a5fec4e905e2da9cf
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file UIOP_Endpoint.h
7 * UIOP implementation of PP Framework Endpoint interface.
9 * @author Marina Spivak <marina@cs.wustl.edu>
11 //==========================================================================
13 #ifndef TAO_UIOP_ENDPOINT_H
14 #define TAO_UIOP_ENDPOINT_H
15 #include /**/ "ace/pre.h"
17 #include "tao/orbconf.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 # if TAO_HAS_UIOP == 1
25 #include "tao/Strategies/strategies_export.h"
26 #include "tao/Endpoint.h"
27 #include "ace/UNIX_Addr.h"
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class TAO_UIOP_Endpoint
34 * @brief TAO_UIOP_Endpoint
36 * UIOP-specific implementation of PP Framework Endpoint interface.
38 class TAO_Strategies_Export TAO_UIOP_Endpoint : public TAO_Endpoint
40 public:
41 friend class TAO_UIOP_Profile;
43 /// Default constructor.
44 TAO_UIOP_Endpoint ();
46 /// Constructor.
47 TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr,
48 CORBA::Short priority = TAO_INVALID_PRIORITY);
50 /// Destructor.
51 ~TAO_UIOP_Endpoint () = default;
53 /**
54 * @name TAO_Endpoint Methods
56 * Please check the documentation in Endpoint.h for details.
58 //@{
59 virtual TAO_Endpoint *next ();
60 virtual int addr_to_string (char *buffer, size_t length);
61 virtual TAO_Endpoint *duplicate ();
63 /// Return true if this endpoint is equivalent to @a other_endpoint. Two
64 /// endpoints are equivalent if their rendezvous points are the same.
65 CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint);
67 /// Return a hash value for this object.
68 virtual CORBA::ULong hash ();
69 //@}
71 // = UIOP_Endpoint-specific methods.
73 /// Return a reference to the <object_addr>.
74 const ACE_UNIX_Addr &object_addr () const;
76 /// Return a pointer to the rendezvous point string.
77 /// This object maintains ownership of the returned string.
78 const char *rendezvous_point () const;
80 private:
81 /// Cached instance of <ACE_UNIX_Addr> for use in making
82 /// invocations, etc.
83 ACE_UNIX_Addr object_addr_;
85 /// UIOP Endpoints can be strung into a list. Return the next
86 /// endpoint in the list, if any.
87 TAO_UIOP_Endpoint *next_;
90 TAO_END_VERSIONED_NAMESPACE_DECL
92 #if defined (__ACE_INLINE__)
93 # include "tao/Strategies/UIOP_Endpoint.inl"
94 #endif /* __ACE_INLINE__ */
96 # endif /* TAO_HAS_UIOP == 1 */
98 #include /**/ "ace/post.h"
99 #endif /* TAO_UIOP_ENDPOINT_H */