IPv4Address.h

Go to the documentation of this file.
00001 /*
00002  * $Id: IPv4Address.h 566 2007-12-02 08:20:52Z mindstorm2600 $
00003  *
00004  * X-VR2 
00005  * 
00006  * Copyright (C) Juan V. Guerrero 2007
00007  * 
00008  * Juan V. Guerrero <mindstorm2600@users.sourceforge.net>
00009  * 
00010  * This program is free software, distributed under the terms of
00011  * the GNU General Public License Version 2. See the LICENSE file
00012  * at the top of the source tree.
00013  */
00014 #ifndef __XVR2_NET_IPV4_ADDRESS_H__
00015 #define __XVR2_NET_IPV4_ADDRESS_H__
00016 #include<iostream>
00017 #include<xvr2/Object.h>
00018 #include<xvr2/String.h>
00019 #include<xvr2/Net/NetworkExceptions.h>
00020 #include<xvr2/Net/IPAddress.h>
00021 #include<xvr2/Net/IPv4Resolver.h>
00022 #ifdef UNIX_SOCKETS
00023 #include<sys/socket.h>
00024 #include<sys/types.h>
00025 #include<netinet/in.h>
00026 #include<netdb.h>
00027 #endif
00028 
00029 namespace xvr2 {
00030         namespace Net {
00031                 class IPv4Resolver;
00032 
00037                 class IPv4Address:public IPAddress {
00038                         protected:
00041                                 struct ::in_addr addr;
00042                         public:
00046                                 IPv4Address();
00057                                 IPv4Address(const String &ip_or_host);
00059                                 IPv4Address(UInt8 a, UInt8 b, UInt8 c, UInt8 d);
00064                                 IPv4Address(const IPv4Address &ip);
00069                                 IPv4Address(const struct ::in_addr *x_addr);
00074                                 IPv4Address(const struct ::in_addr &x_addr);
00076                                 ~IPv4Address();
00081                                 IPv4Address &operator=(const struct ::in_addr *_addr);
00086                                 IPv4Address &operator=(const struct ::in_addr &_addr);
00087                                 const struct ::in_addr *address() const;
00088                                 std::string toString();
00089                                 friend std::ostream& operator<<(std::ostream& stream, const IPv4Address &s);
00090                 };
00091         };
00092 };
00093 #endif

Generated on Fri Jun 20 22:55:47 2008 for X-VR2 SDK by  doxygen 1.5.5