dca_interface  6.3.4
dca_ipr::IprCategory Class Reference

#include <ipr_category.h>

Detailed Description

The IprCategory class contains information for a single category. An IP address can be assigned to one or more categories.

To retrieve all categories available use the IprCategoriesInfo class.

See also
IprCategoriesInfo

Definition at line 27 of file ipr_category.h.

Public Member Functions

bool operator== (const IprCategory &aInst) const
 Equality operator, returns true if two IprCategory objects refer to the identical internal category. More...
 
bool operator!= (const IprCategory &aInst) const
 Inequality operator, returns true if two IprCategory objects refer to different internal categories. More...
 
DCA_CATEGORY_ID_TYPE id () const
 Returns the internal id of a IprCategory class. More...
 
std::string name (const std::string &localeString=std::string()) const
 Returns the localized (display) name of the category. More...
 
DCA_SIZE_TYPE enumsSize () const
 Returns the count of IprEnum items associated with current IprCategory. More...
 
DCA_ENUM_ID_TYPE enumId (DCA_INDEX_TYPE index) const
 Returns the id of an enum item associated with the current IprCategory. More...
 
DCA_ENUM_ID_TYPE enumByValue (int value) const
 Returns the id of an enum item associated with the current IprCategory. More...
 

Member Function Documentation

◆ operator==()

bool dca_ipr::IprCategory::operator== ( const IprCategory aInst) const

Equality operator, returns true if two IprCategory objects refer to the identical internal category.

Parameters
[in]aInstAnother IprCategory instance to check for equality with current instance.
Returns
True if identical else false
See also
dca_ipr::NullIprCategory

◆ operator!=()

bool dca_ipr::IprCategory::operator!= ( const IprCategory aInst) const

Inequality operator, returns true if two IprCategory objects refer to different internal categories.

Parameters
[in]aInstAnother instance to check for inequality with the current instance.
Returns
False if identical, otherwise true
See also
dca_ipr::NullIprCategory

◆ id()

DCA_CATEGORY_ID_TYPE dca_ipr::IprCategory::id ( ) const

Returns the internal id of a IprCategory class.

Returns
The id of the category.

◆ name()

std::string dca_ipr::IprCategory::name ( const std::string &  localeString = std::string()) const

Returns the localized (display) name of the category.

Parameters
[in]localeStringThe name of the Locale to be used. Leave blank for using the default locale ("en_US")
Returns
Localized category name.
Note
The available locales for a given IprCategoriesInfo object can be obtained via the Locales class.

◆ enumsSize()

DCA_SIZE_TYPE dca_ipr::IprCategory::enumsSize ( ) const

Returns the count of IprEnum items associated with current IprCategory.

Returns
Returns the count of IprEnum items or 0 if the IprCategory does not contain any IprEnum items.

◆ enumId()

DCA_ENUM_ID_TYPE dca_ipr::IprCategory::enumId ( DCA_INDEX_TYPE  index) const

Returns the id of an enum item associated with the current IprCategory.

Returns
Returns the id of an enum item with the given index, related to the current category. If no enum exists for the current index -1 will be returned.
Parameters
[in]indexThe index of the enum id to retrieve. The value must be in the range of 0..enumSize()-1

◆ enumByValue()

DCA_ENUM_ID_TYPE dca_ipr::IprCategory::enumByValue ( int  value) const

Returns the id of an enum item associated with the current IprCategory.

Returns
Returns the id of the enum item by a given value. that is usually returned from a IPR classification call. If no enum exists with the current value -1 will be returned.
Parameters
[in]valueThe value returned from a IprClassifier::classify() call
See also
IprClassifier::classify(), IprClassificationResult

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