summaryrefslogtreecommitdiff
path: root/websvcs
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-05 05:12:13 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-05 05:12:13 +0000
commit87c6b87940b494336d59aeb8b2572804b8101b86 (patch)
tree84d03f148f9c95c1febbf0e7265641e6e72c206b /websvcs
parent5c0a446d2f3e9a774fb2e29cd3049e9523fb62ec (diff)
downloadATCD-87c6b87940b494336d59aeb8b2572804b8101b86.tar.gz
ChangeLogTag:Thu Feb 4 23:11:26 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'websvcs')
-rw-r--r--websvcs/lib/URL_Addr.cpp10
-rw-r--r--websvcs/lib/URL_Addr.h17
-rw-r--r--websvcs/lib/URL_Addr.i40
3 files changed, 63 insertions, 4 deletions
diff --git a/websvcs/lib/URL_Addr.cpp b/websvcs/lib/URL_Addr.cpp
index 22620aae941..439e4d130c2 100644
--- a/websvcs/lib/URL_Addr.cpp
+++ b/websvcs/lib/URL_Addr.cpp
@@ -253,8 +253,14 @@ ACE_HTTP_Addr::set (const ACE_HTTP_Addr &addr)
if (this->ACE_URL_Addr::set (addr) != 0)
return -1;
this->clear ();
- ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (addr.hostname_), -1);
- ACE_ALLOCATOR_RETURN (this->path_, ACE_OS::strdup (addr.path_), -1);
+ if (addr.hostname_ != 0)
+ ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (addr.hostname_), -1);
+ else
+ ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (""), -1);
+ if (addr.path_ != 0)
+ ACE_ALLOCATOR_RETURN (this->path_, ACE_OS::strdup (addr.path_), -1);
+ else
+ ACE_ALLOCATOR_RETURN (this->path_, ACE_OS::strdup (""), -1);
this->port_number_ = addr.port_number_;
if (addr.query_ != 0)
ACE_ALLOCATOR_RETURN (this->query_, ACE_OS::strdup (addr.query_), -1);
diff --git a/websvcs/lib/URL_Addr.h b/websvcs/lib/URL_Addr.h
index 1c37713c4b3..8013475e939 100644
--- a/websvcs/lib/URL_Addr.h
+++ b/websvcs/lib/URL_Addr.h
@@ -42,14 +42,18 @@ public:
ACE_URL_Addr (const ACE_URL_Addr& address);
// The copy constructor.
+ ACE_URL_Addr& operator= (const ACE_URL_Addr& address);
+ // The assignment operator
+
+ virtual ~ACE_URL_Addr (void);
+ // destructor
+
LPCTSTR get_url (void) const;
// Get the original URL
int set (const ACE_URL_Addr& address);
// Essentially the copy contructor.
- virtual ~ACE_URL_Addr (void);
-
virtual int string_to_addr (LPCTSTR address);
// Initializes from the scheme specific address, for instance: if
// the address is an http URL it will initialize the address from
@@ -164,6 +168,9 @@ public:
ACE_HTTP_Addr (const ACE_HTTP_Addr &addr);
// Copy constructor.
+ ACE_HTTP_Addr& operator= (const ACE_HTTP_Addr &addr);
+ // Assignment operator.
+
int set (const ACE_HTTP_Addr &addr);
// Essentially the copy constructor.
@@ -264,6 +271,9 @@ public:
ACE_FTP_Addr (const ACE_FTP_Addr &addr);
// Copy constructor.
+ ACE_FTP_Addr& operator= (const ACE_FTP_Addr &addr);
+ // Assignment operator
+
int set (const ACE_FTP_Addr &addr);
// Essentially the copy constructor.
@@ -340,6 +350,9 @@ public:
ACE_Mailto_Addr (const ACE_Mailto_Addr &addr);
// Copy constructor.
+ ACE_Mailto_Addr& operator= (const ACE_Mailto_Addr &addr);
+ // Assignment operator
+
int set (const ACE_Mailto_Addr &addr);
// Essentially the copy constructor.
diff --git a/websvcs/lib/URL_Addr.i b/websvcs/lib/URL_Addr.i
index 482abda66ab..f725ebe047f 100644
--- a/websvcs/lib/URL_Addr.i
+++ b/websvcs/lib/URL_Addr.i
@@ -8,6 +8,16 @@ ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr& address)
{
}
+ACE_INLINE ACE_URL_Addr&
+ACE_URL_Addr::operator= (const ACE_URL_Addr& address)
+{
+ if (this == &address)
+ return *this;
+
+ this->set (address);
+ return *this;
+}
+
ACE_INLINE LPCTSTR
ACE_URL_Addr::get_url (void) const
{
@@ -22,6 +32,16 @@ ACE_URL_Addr::set_url (LPTSTR url)
// ****************************************************************
+ACE_INLINE ACE_HTTP_Addr&
+ACE_HTTP_Addr::operator= (const ACE_HTTP_Addr& rhs)
+{
+ if (this == &rhs)
+ return *this;
+
+ this->set (rhs);
+ return *this;
+}
+
ACE_INLINE ACE_INET_Addr
ACE_HTTP_Addr::get_inet_address (void) const
{
@@ -54,6 +74,16 @@ ACE_HTTP_Addr::get_query (void) const
// ****************************************************************
+ACE_INLINE ACE_FTP_Addr&
+ACE_FTP_Addr::operator= (const ACE_FTP_Addr& rhs)
+{
+ if (this == &rhs)
+ return *this;
+
+ this->set (rhs);
+ return *this;
+}
+
ACE_INLINE LPCTSTR
ACE_FTP_Addr::get_user (void) const
{
@@ -86,6 +116,16 @@ ACE_FTP_Addr::get_inet_address (void) const
// ****************************************************************
+ACE_INLINE ACE_Mailto_Addr&
+ACE_Mailto_Addr::operator= (const ACE_Mailto_Addr& rhs)
+{
+ if (this == &rhs)
+ return *this;
+
+ this->set (rhs);
+ return *this;
+}
+
ACE_INLINE LPCTSTR
ACE_Mailto_Addr::get_user (void) const
{