dca_ipr::IprCategoriesInfo Class Reference
[IP Reputation]

#include <ipr_categoriesinfo.h>

List of all members.


Detailed Description

Container class for all IPR enumeration objects.

Can be obtained from a IprClassification object.

You can use the related member functions to enumerate all locales, enums and categories.

See also:
IprClassification, IprLocales, IprCategories

The following sample code shows how to iterate over the data contained in a IprCategoriesInfo object:

void EnumerateIprCategoriesInfo( const dca_ipr::IprCategoriesInfo& myCategoriesInfo )
{
        // assume we have a successfully initialized myCategoriesInfo

        // enumerate locales...
        {
                const dca_ipr::IprLocales myLocales = myCategoriesInfo.getLocales();
                const DCA_SIZE_TYPE numOfItems = myLocales.size();
                for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
                        const dca_ipr::IprLocale myLocale = myLocales[ i ];
                        cout << (i+1)
                             << ") Locale languageid='" << myLocale.langugageId()
                                 <<      "', displayname='" << myLocale.displayName()
                                 << endl;
                }
        }

        // enumerate categories...
        {
                const dca_ipr::IprCategories myCategories = myCategoriesInfo.getCategories();
                const DCA_SIZE_TYPE numOfItems = myCategories.size();
                for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
                        const dca_ipr::IprCategory myCategory = myCategories[ i ];
                        cout << (i+1)
                                 << ") Category name=" << myCategory.name( "" )
                                 << ", id=" << myCategory.id() << endl;
                }
        }

        // enumerate enums...
        {
                const dca_ipr::IprEnums myEnums = myCategoriesInfo.getEnums();
                const DCA_SIZE_TYPE numOfItems = myEnums.size();
                for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
                        const dca_ipr::IprEnum myEnum = myEnums[ i ];
                        cout << (i+1)
                                 << ") Enum name=" << myEnum.name( "" )
                                 << ", id=" << myEnum.id() << endl;
                }
        }

}

Definition at line 39 of file ipr_categoriesinfo.h.

Public Member Functions

IprLocales getLocales () const
 Returns the contained IprLocales.
IprCategories getCategories () const
 Returns the contained IprCategories.
IprEnums getEnums () const
 Returns the contained IprEnums.

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

Generated on 26 Sep 2016 for dca_interface by  doxygen 1.6.1