Ice 3.7 C++11 API Reference
|
Go to the documentation of this file.
16 #ifndef __Ice_Endpoint_h__
17 #define __Ice_Endpoint_h__
34 #ifndef ICE_IGNORE_VERSION
35 # if ICE_INT_VERSION / 100 != 307
36 # error Ice version mismatch!
38 # if ICE_INT_VERSION % 100 >= 50
39 # error Beta header file detected
41 # if ICE_INT_VERSION % 100 < 10
42 # error Ice patch level mismatch!
47 # if defined(ICE_STATIC_LIBS)
49 # elif defined(ICE_API_EXPORTS)
50 # define ICE_API ICE_DECLSPEC_EXPORT
52 # define ICE_API ICE_DECLSPEC_IMPORT
56 #ifdef ICE_CPP11_MAPPING // C++11 mapping
64 class TCPEndpointInfo;
65 class UDPEndpointInfo;
67 class OpaqueEndpointInfo;
147 EndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo>& underlying,
int timeout,
bool compress) :
148 underlying(underlying),
158 virtual short type() const noexcept = 0;
164 virtual
bool datagram() const noexcept = 0;
170 virtual
bool secure() const noexcept = 0;
206 virtual ::std::string
toString() const noexcept = 0;
242 IPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo>& underlying,
int timeout,
bool compress, const ::std::string& host,
int port, const ::std::string& sourceAddress) :
246 sourceAddress(sourceAddress)
291 TCPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo>& underlying,
int timeout,
bool compress, const ::std::string& host,
int port, const ::std::string& sourceAddress) :
292 IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress)
326 UDPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo>& underlying,
int timeout,
bool compress, const ::std::string& host,
int port, const ::std::string& sourceAddress, const ::std::string& mcastInterface,
int mcastTtl) :
327 IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress),
328 mcastInterface(mcastInterface),
367 WSEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo>& underlying,
int timeout,
bool compress, const ::std::string& resource) :
407 rawEncoding(rawEncoding),
436 using EndpointInfoPtr = ::std::shared_ptr<EndpointInfo>;
438 using EndpointPtr = ::std::shared_ptr<Endpoint>;
440 using IPEndpointInfoPtr = ::std::shared_ptr<IPEndpointInfo>;
442 using TCPEndpointInfoPtr = ::std::shared_ptr<TCPEndpointInfo>;
444 using UDPEndpointInfoPtr = ::std::shared_ptr<UDPEndpointInfo>;
446 using WSEndpointInfoPtr = ::std::shared_ptr<WSEndpointInfo>;
448 using OpaqueEndpointInfoPtr = ::std::shared_ptr<OpaqueEndpointInfo>;
453 #else // C++98 mapping
462 typedef ::IceInternal::Handle< EndpointInfo> EndpointInfoPtr;
468 typedef ::IceInternal::Handle< Endpoint> EndpointPtr;
470 class IPEndpointInfo;
474 typedef ::IceInternal::Handle< IPEndpointInfo> IPEndpointInfoPtr;
476 class TCPEndpointInfo;
480 typedef ::IceInternal::Handle< TCPEndpointInfo> TCPEndpointInfoPtr;
482 class UDPEndpointInfo;
486 typedef ::IceInternal::Handle< UDPEndpointInfo> UDPEndpointInfoPtr;
488 class WSEndpointInfo;
492 typedef ::IceInternal::Handle< WSEndpointInfo> WSEndpointInfoPtr;
494 class OpaqueEndpointInfo;
498 typedef ::IceInternal::Handle< OpaqueEndpointInfo> OpaqueEndpointInfoPtr;
559 class ICE_API EndpointInfo :
public virtual LocalObject
563 typedef EndpointInfoPtr PointerType;
565 virtual ~EndpointInfo();
577 EndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress) :
578 underlying(underlying),
584 #ifdef ICE_CPP11_COMPILER
585 EndpointInfo(
const EndpointInfo&) =
default;
586 EndpointInfo& operator=(
const EndpointInfo&) =
default;
611 ::
Ice::EndpointInfoPtr underlying;
625 inline
bool operator==(const EndpointInfo& lhs, const EndpointInfo& rhs)
627 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
630 inline bool operator<(
const EndpointInfo& lhs,
const EndpointInfo& rhs)
632 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
640 class ICE_API Endpoint :
public virtual LocalObject
644 typedef EndpointPtr PointerType;
648 #ifdef ICE_CPP11_COMPILER
649 Endpoint() =
default;
650 Endpoint(
const Endpoint&) =
default;
651 Endpoint& operator=(
const Endpoint&) =
default;
658 virtual ::std::string toString() const
ICE_NOEXCEPT = 0;
664 virtual EndpointInfoPtr getInfo() const
ICE_NOEXCEPT = 0;
668 inline
bool operator==(const Endpoint& lhs, const Endpoint& rhs)
670 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
673 inline bool operator<(
const Endpoint& lhs,
const Endpoint& rhs)
675 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
684 class ICE_API IPEndpointInfo :
public EndpointInfo
688 typedef IPEndpointInfoPtr PointerType;
690 virtual ~IPEndpointInfo();
705 IPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress, const ::std::string& host, ::
Ice::Int port, const ::std::string& sourceAddress) :
706 ::
Ice::EndpointInfo(underlying, timeout, compress),
709 sourceAddress(sourceAddress)
713 #ifdef ICE_CPP11_COMPILER
714 IPEndpointInfo(
const IPEndpointInfo&) =
default;
715 IPEndpointInfo& operator=(
const IPEndpointInfo&) =
default;
729 ::std::string sourceAddress;
733 inline bool operator==(
const IPEndpointInfo& lhs,
const IPEndpointInfo& rhs)
735 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
738 inline bool operator<(
const IPEndpointInfo& lhs,
const IPEndpointInfo& rhs)
740 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
749 class ICE_API TCPEndpointInfo :
public IPEndpointInfo
753 typedef TCPEndpointInfoPtr PointerType;
755 virtual ~TCPEndpointInfo();
770 TCPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress, const ::std::string& host, ::
Ice::Int port, const ::std::string& sourceAddress) :
771 ::
Ice::IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress)
775 #ifdef ICE_CPP11_COMPILER
776 TCPEndpointInfo(
const TCPEndpointInfo&) =
default;
777 TCPEndpointInfo& operator=(
const TCPEndpointInfo&) =
default;
782 inline bool operator==(
const TCPEndpointInfo& lhs,
const TCPEndpointInfo& rhs)
784 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
787 inline bool operator<(
const TCPEndpointInfo& lhs,
const TCPEndpointInfo& rhs)
789 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
798 class ICE_API UDPEndpointInfo :
public IPEndpointInfo
802 typedef UDPEndpointInfoPtr PointerType;
804 virtual ~UDPEndpointInfo();
821 UDPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress, const ::std::string& host, ::
Ice::Int port, const ::std::string& sourceAddress, const ::std::string& mcastInterface, ::
Ice::Int mcastTtl) :
822 ::
Ice::IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress),
823 mcastInterface(mcastInterface),
828 #ifdef ICE_CPP11_COMPILER
829 UDPEndpointInfo(
const UDPEndpointInfo&) =
default;
830 UDPEndpointInfo& operator=(
const UDPEndpointInfo&) =
default;
836 ::std::string mcastInterface;
844 inline bool operator==(
const UDPEndpointInfo& lhs,
const UDPEndpointInfo& rhs)
846 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
849 inline bool operator<(
const UDPEndpointInfo& lhs,
const UDPEndpointInfo& rhs)
851 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
859 class ICE_API WSEndpointInfo :
public EndpointInfo
863 typedef WSEndpointInfoPtr PointerType;
865 virtual ~WSEndpointInfo();
878 WSEndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress, const ::std::string& resource) :
879 ::
Ice::EndpointInfo(underlying, timeout, compress),
884 #ifdef ICE_CPP11_COMPILER
885 WSEndpointInfo(
const WSEndpointInfo&) =
default;
886 WSEndpointInfo& operator=(
const WSEndpointInfo&) =
default;
892 ::std::string resource;
896 inline bool operator==(
const WSEndpointInfo& lhs,
const WSEndpointInfo& rhs)
898 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
901 inline bool operator<(
const WSEndpointInfo& lhs,
const WSEndpointInfo& rhs)
903 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
912 class ICE_API OpaqueEndpointInfo :
public EndpointInfo
916 typedef OpaqueEndpointInfoPtr PointerType;
918 virtual ~OpaqueEndpointInfo();
932 OpaqueEndpointInfo(const ::Ice::EndpointInfoPtr& underlying, ::
Ice::Int timeout,
bool compress, const ::Ice::EncodingVersion& rawEncoding,
const ::Ice::ByteSeq& rawBytes) :
933 ::
Ice::EndpointInfo(underlying, timeout, compress),
934 rawEncoding(rawEncoding),
939 #ifdef ICE_CPP11_COMPILER
940 OpaqueEndpointInfo(
const OpaqueEndpointInfo&) =
default;
941 OpaqueEndpointInfo& operator=(
const OpaqueEndpointInfo&) =
default;
956 inline bool operator==(
const OpaqueEndpointInfo& lhs,
const OpaqueEndpointInfo& rhs)
958 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
961 inline bool operator<(
const OpaqueEndpointInfo& lhs,
const OpaqueEndpointInfo& rhs)
963 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
UDPEndpointInfo & operator=(const UDPEndpointInfo &)=default
short Short
The mapping for the Slice short type.
Definition: Config.h:52
OpaqueEndpointInfo(OpaqueEndpointInfo &&)=default
IPEndpointInfo & operator=(const IPEndpointInfo &)=default
OpaqueEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::Ice::EncodingVersion &rawEncoding, const ::Ice::ByteSeq &rawBytes)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:405
WSEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &resource)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:367
constexpr short BTSEndpointType
Uniquely identifies SSL Bluetooth endpoints.
Definition: Endpoint.h:107
TCPEndpointInfo & operator=(TCPEndpointInfo &&)=default
#define ICE_CLASS(API)
Definition: Config.h:176
constexpr short BTEndpointType
Uniquely identifies Bluetooth endpoints.
Definition: Endpoint.h:102
virtual bool operator<(const Endpoint &) const =0
UDPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress, const ::std::string &mcastInterface, int mcastTtl)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:326
IPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:242
::std::string host
The host or address configured with the endpoint.
Definition: Endpoint.h:253
TCPEndpointInfo(const TCPEndpointInfo &)=default
OpaqueEndpointInfo & operator=(const OpaqueEndpointInfo &)=default
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
WSEndpointInfo & operator=(WSEndpointInfo &&)=default
IPEndpointInfo(IPEndpointInfo &&)=default
WSEndpointInfo(const WSEndpointInfo &)=default
UDPEndpointInfo & operator=(UDPEndpointInfo &&)=default
IceUtil::Shared * upCast(::Ice::LocalObject *)
int port
The port number.
Definition: Endpoint.h:257
constexpr short TCPEndpointType
Uniquely identifies TCP endpoints.
Definition: Endpoint.h:77
Provides access to a WebSocket endpoint information.
Definition: Endpoint.h:348
The user-level interface to an endpoint.
Definition: Endpoint.h:194
constexpr short iAPEndpointType
Uniquely identifies iAP-based endpoints.
Definition: Endpoint.h:112
UDPEndpointInfo(const UDPEndpointInfo &)=default
#define ICE_NOEXCEPT
Definition: Config.h:128
EndpointInfo & operator=(const EndpointInfo &)=default
#define ICE_API
Definition: Config.h:197
Provides access to a TCP endpoint information.
Definition: Endpoint.h:270
A version structure for the encoding version.
Definition: Version.h:82
constexpr short WSSEndpointType
Uniquely identifies SSL-based WebSocket endpoints.
Definition: Endpoint.h:97
#define ICE_MEMBER(API)
Definition: Config.h:177
TCPEndpointInfo(TCPEndpointInfo &&)=default
virtual short type() const noexcept=0
Returns the type of the endpoint.
::std::string sourceAddress
The source IP address.
Definition: Endpoint.h:261
::std::string resource
The URI configured with the endpoint.
Definition: Endpoint.h:376
EndpointInfo(EndpointInfo &&)=default
virtual ~TCPEndpointInfo()
virtual ~UDPEndpointInfo()
::Ice::ByteSeq rawBytes
The raw encoding of the opaque endpoint.
Definition: Endpoint.h:420
Base class providing access to the endpoint details.
Definition: Endpoint.h:129
IPEndpointInfo(const IPEndpointInfo &)=default
UDPEndpointInfo(UDPEndpointInfo &&)=default
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
TCPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:291
WSEndpointInfo(WSEndpointInfo &&)=default
::Ice::EncodingVersion rawEncoding
The encoding version of the opaque endpoint (to decode or encode the rawBytes).
Definition: Endpoint.h:416
Provides access to the details of an opaque endpoint.
Definition: Endpoint.h:385
constexpr short iAPSEndpointType
Uniquely identifies SSL iAP-based endpoints.
Definition: Endpoint.h:117
virtual ::std::string toString() const noexcept=0
Return a string representation of the endpoint.
OpaqueEndpointInfo(const OpaqueEndpointInfo &)=default
UDPEndpointInfo()=default
virtual ~OpaqueEndpointInfo()
IPEndpointInfo & operator=(IPEndpointInfo &&)=default
virtual ~IPEndpointInfo()
EndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress)
One-shot constructor to initialize all data members.
Definition: Endpoint.h:147
constexpr short SSLEndpointType
Uniquely identifies SSL endpoints.
Definition: Endpoint.h:82
EndpointInfo(const EndpointInfo &)=default
virtual ~WSEndpointInfo()
::std::string mcastInterface
The multicast interface.
Definition: Endpoint.h:336
Definition: BuiltinSequences.h:56
constexpr short UDPEndpointType
Uniquely identifies UDP endpoints.
Definition: Endpoint.h:87
TCPEndpointInfo & operator=(const TCPEndpointInfo &)=default
EndpointInfo & operator=(EndpointInfo &&)=default
virtual bool operator==(const Endpoint &) const =0
constexpr short WSEndpointType
Uniquely identifies TCP-based WebSocket endpoints.
Definition: Endpoint.h:92
OpaqueEndpointInfo()=default
TCPEndpointInfo()=default
Provides access to an UDP endpoint information.
Definition: Endpoint.h:303
OpaqueEndpointInfo & operator=(OpaqueEndpointInfo &&)=default
int mcastTtl
The multicast time-to-live (or hops).
Definition: Endpoint.h:340
int Int
The mapping for the Slice int type.
Definition: Config.h:54
Provides access to the address details of a IP endpoint.
Definition: Endpoint.h:221
::std::vector< Byte > ByteSeq
A sequence of bytes.
Definition: BuiltinSequences.h:66
WSEndpointInfo & operator=(const WSEndpointInfo &)=default