AXCEL C++ Framework
Elegance through abstraction
Public Member Functions | Public Attributes
axcel::net::ipaddr Class Reference

IPv4 or IPv6 address. More...

#include <axcel.h>

Inheritance diagram for axcel::net::ipaddr:
axcel::object

List of all members.

Public Member Functions

virtual string type ()
 Get type of object.
virtual operator string ()
 Convert to string.
 ipaddr (const char *s="127.0.0.1")
 ipaddr (struct in_addr *s)
 ipaddr (struct in6_addr *s)
net::ipaddroperator= (const char *s)
 Assign IP address or hostname.
net::ipaddroperator= (struct in_addr *s)
net::ipaddroperator= (struct in6_addr *s)
bool operator== (const char *s)
bool operator== (struct in_addr *s)
bool operator== (struct in6_addr *s)
bool operator!= (const char *s)
bool operator!= (struct in_addr *s)
bool operator!= (struct in6_addr *s)
bool operator> (const char *s)
bool operator> (struct in_addr *s)
bool operator> (struct in6_addr *s)
bool operator< (const char *s)
bool operator< (struct in_addr *s)
bool operator< (struct in6_addr *s)
bool operator>= (const char *s)
bool operator>= (struct in_addr *s)
bool operator>= (struct in6_addr *s)
bool operator<= (const char *s)
bool operator<= (struct in_addr *s)
bool operator<= (struct in6_addr *s)
net::ipaddr operator+ (int i)
net::ipaddr operator- (int i)
net::ipaddroperator+= (int i)
net::ipaddroperator-= (int i)
net::ipaddroperator++ ()
net::ipaddr operator++ (int foo)
net::ipaddroperator-- ()
net::ipaddr operator-- (int foo)

Public Attributes

int af
union {
   struct in_addr   addr4
   struct in6_addr   addr6
}; 

Detailed Description

IPv4 or IPv6 address.

Definition at line 873 of file axcel.h.


Constructor & Destructor Documentation

axcel::net::ipaddr::ipaddr ( const char *  s = "127.0.0.1")

Definition at line 4092 of file axcel.cpp.

axcel::net::ipaddr::ipaddr ( struct in_addr *  s)

Definition at line 4097 of file axcel.cpp.

axcel::net::ipaddr::ipaddr ( struct in6_addr *  s)

Definition at line 4102 of file axcel.cpp.


Member Function Documentation

axcel::net::ipaddr::operator string ( ) [virtual]

Convert to string.

Returns:
Suitable string representation of object's data

Implements axcel::object.

Definition at line 4049 of file axcel.cpp.

bool axcel::net::ipaddr::operator!= ( const char *  s)

Definition at line 4135 of file axcel.cpp.

bool axcel::net::ipaddr::operator!= ( struct in_addr *  s)

Definition at line 4141 of file axcel.cpp.

bool axcel::net::ipaddr::operator!= ( struct in6_addr *  s)

Definition at line 4147 of file axcel.cpp.

net::ipaddr axcel::net::ipaddr::operator+ ( int  i)

Definition at line 4227 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator++ ( )

Definition at line 4335 of file axcel.cpp.

net::ipaddr axcel::net::ipaddr::operator++ ( int  foo)

Definition at line 4336 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator+= ( int  i)

Definition at line 4333 of file axcel.cpp.

net::ipaddr axcel::net::ipaddr::operator- ( int  i)

Definition at line 4280 of file axcel.cpp.

net::ipaddr axcel::net::ipaddr::operator-- ( int  foo)

Definition at line 4338 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator-- ( )

Definition at line 4337 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator-= ( int  i)

Definition at line 4334 of file axcel.cpp.

bool axcel::net::ipaddr::operator< ( struct in_addr *  s)

Definition at line 4144 of file axcel.cpp.

bool axcel::net::ipaddr::operator< ( struct in6_addr *  s)

Definition at line 4150 of file axcel.cpp.

bool axcel::net::ipaddr::operator< ( const char *  s)

Definition at line 4138 of file axcel.cpp.

bool axcel::net::ipaddr::operator<= ( struct in6_addr *  s)

Definition at line 4151 of file axcel.cpp.

bool axcel::net::ipaddr::operator<= ( const char *  s)

Definition at line 4139 of file axcel.cpp.

bool axcel::net::ipaddr::operator<= ( struct in_addr *  s)

Definition at line 4145 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator= ( struct in_addr *  s)

Definition at line 4216 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator= ( const char *  s)

Assign IP address or hostname.

Parameters:
sstring containing representation of IP address or a hostname

Assigns the string representation of an IPv4 or IPv6 address to this object. If s is a hostname, then it's IP address is resolved first and then assigned.

Definition at line 4159 of file axcel.cpp.

net::ipaddr & axcel::net::ipaddr::operator= ( struct in6_addr *  s)

Definition at line 4221 of file axcel.cpp.

bool axcel::net::ipaddr::operator== ( struct in6_addr *  s)

Definition at line 4146 of file axcel.cpp.

bool axcel::net::ipaddr::operator== ( const char *  s)

Definition at line 4134 of file axcel.cpp.

bool axcel::net::ipaddr::operator== ( struct in_addr *  s)

Definition at line 4140 of file axcel.cpp.

bool axcel::net::ipaddr::operator> ( struct in_addr *  s)

Definition at line 4142 of file axcel.cpp.

bool axcel::net::ipaddr::operator> ( const char *  s)

Definition at line 4136 of file axcel.cpp.

bool axcel::net::ipaddr::operator> ( struct in6_addr *  s)

Definition at line 4148 of file axcel.cpp.

bool axcel::net::ipaddr::operator>= ( const char *  s)

Definition at line 4137 of file axcel.cpp.

bool axcel::net::ipaddr::operator>= ( struct in_addr *  s)

Definition at line 4143 of file axcel.cpp.

bool axcel::net::ipaddr::operator>= ( struct in6_addr *  s)

Definition at line 4149 of file axcel.cpp.

string axcel::net::ipaddr::type ( ) [virtual]

Get type of object.

Returns:
string containing name of object's class.

Implements axcel::object.

Definition at line 4048 of file axcel.cpp.


Member Data Documentation

union { ... }
struct in_addr axcel::net::ipaddr::addr4

Definition at line 883 of file axcel.h.

struct in6_addr axcel::net::ipaddr::addr6

Definition at line 883 of file axcel.h.

Definition at line 882 of file axcel.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines