HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_IpValidator Class Reference

#include <NET_IpValidator.h>

Public Member Functions

 NET_IpValidator (const NET_IServerInfo &server)
 
 NET_IpValidator (const NET_IServerInfo &server, const UT_StringArray &masks)
 
bool match (const UT_IpAddressV4 &ip) const
 Check if the provided ip matches one of the ip masks. More...
 
bool match (const UT_IpAddressV6 &ip) const
 Check if the provided ip matches one of the ip masks. More...
 
bool match (const UT_IpAddress &ip) const
 
void setMasks (const UT_StringArray &masks)
 
void setMask (const UT_StringHolder &mask)
 
void addMask (const UT_StringHolder &mask)
 Add the provided mask to the current list of masks. More...
 
void addMasks (const UT_StringArray &masks)
 Add the provided list of masks to the current list of masks. More...
 
UT_StringHolder toStringV4 () const
 
UT_StringHolder toStringV6 () const
 

Detailed Description

Validates ip addresses based on a set of standard ip subnet masks and custom format ip masks. Note: the custom format has been deprecated for the standard format.

Definition at line 28 of file NET_IpValidator.h.

Constructor & Destructor Documentation

NET_IpValidator::NET_IpValidator ( const NET_IServerInfo server)
inline

Definition at line 31 of file NET_IpValidator.h.

NET_IpValidator::NET_IpValidator ( const NET_IServerInfo server,
const UT_StringArray masks 
)
inline

Definition at line 37 of file NET_IpValidator.h.

Member Function Documentation

void NET_IpValidator::addMask ( const UT_StringHolder mask)

Add the provided mask to the current list of masks.

void NET_IpValidator::addMasks ( const UT_StringArray masks)
inline

Add the provided list of masks to the current list of masks.

Definition at line 110 of file NET_IpValidator.h.

bool NET_IpValidator::match ( const UT_IpAddressV4 ip) const

Check if the provided ip matches one of the ip masks.

bool NET_IpValidator::match ( const UT_IpAddressV6 ip) const
inline

Check if the provided ip matches one of the ip masks.

Definition at line 46 of file NET_IpValidator.h.

bool NET_IpValidator::match ( const UT_IpAddress ip) const
inline

Check if the provided ip matches on of the ip masks based on the ip address type.

Definition at line 83 of file NET_IpValidator.h.

void NET_IpValidator::setMask ( const UT_StringHolder mask)
inline

Set the ip masks to the provided mask. Note that the previous list of masks are cleared.

Definition at line 100 of file NET_IpValidator.h.

void NET_IpValidator::setMasks ( const UT_StringArray masks)
inline

Set the ip masks to the provided list. Note that the previous list of masks are cleared.

Definition at line 91 of file NET_IpValidator.h.

UT_StringHolder NET_IpValidator::toStringV4 ( ) const
inline

Definition at line 115 of file NET_IpValidator.h.

UT_StringHolder NET_IpValidator::toStringV6 ( ) const
inline

Definition at line 133 of file NET_IpValidator.h.


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