\r\n

51Degrees Device Detection C/C++  4.4

A device detection library that is used natively or by 51Degrees products

FiftyoneDegrees::IpIntelligence::IpAddress Class Reference

Detailed Description

A class which represents an IP address.

This class is to give the IP address byte array a more concrete and 'easy to work with' form so that it can be passed between managed and unmanaged layers

Public Member Functions

Constructors

 IpAddress ()
Construct a default instance with an invalid IP address.
 IpAddress (const unsigned char ipAddressData[], fiftyoneDegreesEvidenceIpType addressType)
Construct an instance with a given combination of IP address byte array and its type. More...
 IpAddress (const char *ipAddressString)
Construct an instance with a given IP address string. More...

Getters

const unsigned char *  getIpAddress () const
Get the IP address byte array. More...
void  getCopyOfIpAddress (unsigned char copy[], uint32_t size) const
Returns a copy of the IP address byte array This is used mainly for SWIG so that other language can get a value of the byte array. More...
fiftyoneDegreesEvidenceIpType  getType () const
Get the type of the IP address. More...

Constructor & Destructor Documentation

◆ IpAddress() [1/2]

FiftyoneDegrees::IpIntelligence::IpAddress::IpAddress ( const unsigned char   ipAddressData[],
fiftyoneDegreesEvidenceIpType   addressType  
)

Construct an instance with a given combination of IP address byte array and its type.

Parameters
ipAddressData - the IP address byte array
addressType - the type of the IP address

◆ IpAddress() [2/2]

FiftyoneDegrees::IpIntelligence::IpAddress::IpAddress ( const char *   ipAddressString )

Construct an instance with a given IP address string.

The type of the IP address is determined by parsing the string

Parameters
ipAddressString - the IP address string

Member Function Documentation

◆ getCopyOfIpAddress()

void FiftyoneDegrees::IpIntelligence::IpAddress::getCopyOfIpAddress ( unsigned char   copy[],
uint32_t   size  
) const

Returns a copy of the IP address byte array This is used mainly for SWIG so that other language can get a value of the byte array.

By using carrays.i in SWIG, any access to this copy can be done via SWIG array functions.

To get the actual pointer, the getIpAddress should be used.

Parameters
copy - which will hold a copy of the byte array
size - of the copy buffer

◆ getIpAddress()

const unsigned char* FiftyoneDegrees::IpIntelligence::IpAddress::getIpAddress ( ) const
inline

Get the IP address byte array.

Returns
a constant pointer to the internal byte array

◆ getType()

fiftyoneDegreesEvidenceIpType FiftyoneDegrees::IpIntelligence::IpAddress::getType ( ) const
inline

Get the type of the IP address.

Returns
the type of IP address

The documentation for this class was generated from the following file:
  • /home/runner/work/device-detection-cxx/device-detection-cxx/common/device-detection-cxx/src/common-cxx/IpAddress.hpp