feisty meow concerns codebase  2.140
sockets::subnet_calculator Class Reference

Provides an easy way to determine the range of a subnet given the subnet mask and a sample IP address. More...

#include <subnet_calculator.h>

Inheritance diagram for sockets::subnet_calculator:
Collaboration diagram for sockets::subnet_calculator:

Public Member Functions

 subnet_calculator (const basis::astring &subnet_mask, const basis::astring &ip_address)
 
 ~subnet_calculator ()
 
basis::astring convert (basis::un_int num_format)
 
basis::un_int convert (const basis::astring &ip_format)
 
const basis::astringlow_end ()
 
const basis::astringhigh_end ()
 
const basis::astringsubnet_mask () const
 
void subnet_mask (const basis::astring &new_mask)
 
const basis::astringip_address () const
 
void ip_address (const basis::astring &new_address)
 
bool valid () const
 

Detailed Description

Provides an easy way to determine the range of a subnet given the subnet mask and a sample IP address.

Definition at line 24 of file subnet_calculator.h.

Constructor & Destructor Documentation

◆ subnet_calculator()

sockets::subnet_calculator::subnet_calculator ( const basis::astring subnet_mask,
const basis::astring ip_address 
)

Definition at line 32 of file subnet_calculator.cpp.

◆ ~subnet_calculator()

sockets::subnet_calculator::~subnet_calculator ( )

Definition at line 40 of file subnet_calculator.cpp.

References basis::WHACK().

Member Function Documentation

◆ convert() [1/2]

astring sockets::subnet_calculator::convert ( basis::un_int  num_format)

Definition at line 77 of file subnet_calculator.cpp.

References basis::astring::t().

◆ convert() [2/2]

un_int sockets::subnet_calculator::convert ( const basis::astring ip_format)

◆ high_end()

const astring & sockets::subnet_calculator::high_end ( )

Definition at line 71 of file subnet_calculator.cpp.

◆ ip_address() [1/2]

const astring & sockets::subnet_calculator::ip_address ( ) const

Definition at line 51 of file subnet_calculator.cpp.

◆ ip_address() [2/2]

void sockets::subnet_calculator::ip_address ( const basis::astring new_address)

Definition at line 59 of file subnet_calculator.cpp.

◆ low_end()

const astring & sockets::subnet_calculator::low_end ( )

Definition at line 65 of file subnet_calculator.cpp.

◆ subnet_mask() [1/2]

const astring & sockets::subnet_calculator::subnet_mask ( ) const

Definition at line 49 of file subnet_calculator.cpp.

◆ subnet_mask() [2/2]

void sockets::subnet_calculator::subnet_mask ( const basis::astring new_mask)

Definition at line 53 of file subnet_calculator.cpp.

◆ valid()

bool sockets::subnet_calculator::valid ( ) const
inline

Definition at line 47 of file subnet_calculator.h.


The documentation for this class was generated from the following files: