From 2d44f1c235029240150361f99c2f349eed62afc4 Mon Sep 17 00:00:00 2001 From: chatty Date: Tue, 10 May 1994 09:49:04 +0000 Subject: Removed useless default impl of virtual functions --- comm/Address.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'comm') diff --git a/comm/Address.h b/comm/Address.h index b220339..70df60b 100644 --- a/comm/Address.h +++ b/comm/Address.h @@ -31,18 +31,17 @@ #define AF_UNIX AF_UNSPEC #endif - -typedef struct sockaddr SockAddr; - -/* this union is useful for adresses returned by system calls */ - -typedef union { +union gen_addr { struct sockaddr sa; // default #ifdef UNIX_SOCK struct sockaddr_un su; // unix #endif struct sockaddr_in si; // inet -} GEN_ADDR; +}; + +typedef struct sockaddr SockAddr; +/* this union is useful for adresses returned by system calls */ +typedef union gen_addr GEN_ADDR; class UchAddress : public CcuSmartData { @@ -54,10 +53,10 @@ public: ~UchAddress (); bool IsValid () const { return Valid; } -virtual int Family (); // AF_UNSPEC, AF_UNIX, AF_INET -virtual int Length (); -virtual SockAddr* GetSockAddr (); -virtual char* StrRepr (char* buf); +virtual int Family () = 0; // AF_UNSPEC, AF_UNIX, AF_INET +virtual int Length () = 0; +virtual SockAddr* GetSockAddr () = 0; +virtual char* StrRepr (char* buf) = 0; static UchAddress* Decode (GEN_ADDR*, int); }; @@ -70,7 +69,7 @@ protected: public: UchInetAddress (); - UchInetAddress (lword, sword = 0); // hostid, port# + UchInetAddress (lword, sword); // hostid, port# UchInetAddress (const char*, sword = 0); // hostname, port# ~UchInetAddress (); -- cgit v1.1