2 //=============================================================================
4 * @file IIOPEndpointValue_i.h
6 * Implementation of the IIOP-Specific endpoint policy value
8 * @author Phil Mesnier <mesnier_p@ociweb.com>
10 //=============================================================================
12 #ifndef _TAO_IIOP_ENDPOINT_VALUE_I_H_
13 #define _TAO_IIOP_ENDPOINT_VALUE_I_H_
15 #include /**/ "ace/pre.h"
17 #include "tao/EndpointPolicy/EndpointPolicy_Export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/orbconf.h"
25 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
27 #include "tao/EndpointPolicy/IIOPEndpointValueC.h"
28 #include "tao/EndpointPolicy/Endpoint_Value_Impl.h"
29 #include "tao/LocalObject.h"
30 #include "ace/INET_Addr.h"
32 // This is to remove "inherits via dominance" warnings from MSVC.
33 // MSVC is being a little too paranoid.
36 #pragma warning(disable:4250)
40 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
43 * @class IIOPEndpointValue_i
45 * @brief Implementation of the IIOP-Specific endpoint policy value
47 * This class is used by applications to create an instance of an
48 * endpoint value for constructing an EndpointPolicy. While the
49 * endpoint policy argument is of type
50 * EndpointPolicy::EndpointValueBase, always use instances of this
51 * type so that the endpoint policy framework is able to call the
52 * equivalency test method.
55 class TAO_EndpointPolicy_Export IIOPEndpointValue_i
:
56 public virtual EndpointPolicy::IIOPEndpointValue
,
57 public virtual TAO_Endpoint_Value_Impl
,
58 public virtual ::CORBA::LocalObject
61 /// Default Constructor. It is acceptable to create an empty value
62 /// and modify the state via the attributes.
63 IIOPEndpointValue_i ();
65 /// Value initializing constructor, this is typically for creation
66 /// of one-off values.
67 IIOPEndpointValue_i (const char *host
, CORBA::UShort port
);
69 virtual ~IIOPEndpointValue_i ();
71 /// The is_equivalent test is used by the endpoint policy framework
72 /// for testing if a target endpoint is the same as the endpoint
73 /// defined by this value.
74 CORBA::Boolean
is_equivalent (const TAO_Endpoint
* endpoint
) const;
76 /// The validate_acceptor method is used during EndpointPolicy
77 /// creation to ensure there is an acceptor which provides this
78 /// endpoint. Currently the test is limited to only validating that
79 /// the acceptor's tag is consistent, as the interfaces do not yet
80 /// exist for examining the eventual TAO_Endpoint values the
81 /// acceptor would produce.
82 CORBA::Boolean
validate_acceptor (TAO_Acceptor
*,
83 bool is_multi_prot
) const;
85 /// Host attribute get/set operators.
87 void host (const char * h
);
89 /// Port attribute get/set operators.
90 CORBA::UShort
port ();
91 void port (CORBA::UShort p
);
93 // Protocol tag get operator, inherited from EndpointValueBase
94 CORBA::ULong
protocol_tag ();
97 CORBA::Boolean
is_equivalent_i (CORBA::UShort port
, const char *host
) const;
99 CORBA::String_var host_
;
105 TAO_END_VERSIONED_NAMESPACE_DECL
107 #if defined(_MSC_VER)
109 #endif /* _MSC_VER */
111 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
113 #include /**/ "ace/post.h"
115 #endif /* _TAO_IIOP_ENDPOINT_VALUE_I_H_ */