faudes::SimplenetAddress Class Reference

Detailed Description

Simplenet node address.

A node address consists of an IP address and a TCP port. This convenience class implements string based access to both components.

Definition at line 31 of file iop_simplenet.h.

#include <iop_simplenet.h>

Public Member Functions

 SimplenetAddress (void)
 Default constructor. More...
 
 SimplenetAddress (const SimplenetAddress &rOther)
 Copy construct. More...
 
 SimplenetAddress (const std::string &rString)
 Construct from string. More...
 
bool Valid (void) const
 Return true if valid. More...
 
std::string Ip (void) const
 Get IP address. More...
 
int Port (void) const
 Get TCP port. More...
 
std::string IpColonPort (void) const
 Get as colon seperated string. More...
 
void Ip (std::string ip)
 Set IP address. More...
 
void Port (int port)
 Set TCP port
More...
 
void IpColonPort (std::string ipcolonport)
 Set from colon seperated string. More...
 
bool operator< (const SimplenetAddress &rOther) const
 Order for sorting containers of addresses. More...
 

Protected Attributes

std::string mIp
 Ip address. More...
 
int mPort
 TCP port. More...
 

Constructor & Destructor Documentation

◆ SimplenetAddress() [1/3]

faudes::SimplenetAddress::SimplenetAddress ( void  )

Default constructor.

Definition at line 35 of file iop_simplenet.cpp.

◆ SimplenetAddress() [2/3]

faudes::SimplenetAddress::SimplenetAddress ( const SimplenetAddress rOther)

Copy construct.

Definition at line 41 of file iop_simplenet.cpp.

◆ SimplenetAddress() [3/3]

faudes::SimplenetAddress::SimplenetAddress ( const std::string &  rString)

Construct from string.

Definition at line 47 of file iop_simplenet.cpp.

Member Function Documentation

◆ Ip() [1/2]

void faudes::SimplenetAddress::Ip ( std::string  ip)
inline

Set IP address.

Definition at line 57 of file iop_simplenet.h.

◆ Ip() [2/2]

std::string faudes::SimplenetAddress::Ip ( void  ) const
inline

Get IP address.

Definition at line 48 of file iop_simplenet.h.

◆ IpColonPort() [1/2]

void faudes::SimplenetAddress::IpColonPort ( std::string  ipcolonport)

Set from colon seperated string.

Definition at line 68 of file iop_simplenet.cpp.

◆ IpColonPort() [2/2]

std::string faudes::SimplenetAddress::IpColonPort ( void  ) const

Get as colon seperated string.

Definition at line 60 of file iop_simplenet.cpp.

◆ operator<()

bool faudes::SimplenetAddress::operator< ( const SimplenetAddress rOther) const

Order for sorting containers of addresses.

Definition at line 92 of file iop_simplenet.cpp.

◆ Port() [1/2]

void faudes::SimplenetAddress::Port ( int  port)
inline

Set TCP port

Definition at line 60 of file iop_simplenet.h.

◆ Port() [2/2]

int faudes::SimplenetAddress::Port ( void  ) const
inline

Get TCP port.

Definition at line 51 of file iop_simplenet.h.

◆ Valid()

bool faudes::SimplenetAddress::Valid ( void  ) const

Return true if valid.

Definition at line 52 of file iop_simplenet.cpp.

Member Data Documentation

◆ mIp

std::string faudes::SimplenetAddress::mIp
protected

Ip address.

Definition at line 71 of file iop_simplenet.h.

◆ mPort

int faudes::SimplenetAddress::mPort
protected

TCP port.

Definition at line 74 of file iop_simplenet.h.


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

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen