dca_interface  6.3.4
dca_wac::WacCategoriesInfo Class Reference

#include <wac_categoriesinfo.h>

Detailed Description

Container class for all WAC enumeration objects.

Can be obtained from a WacClassification object using WacClassification::getCategoriesInfo().

You can use the related member functions to enumerate all applications, actions and tags.

See also
WacClassification, dca::Locales, dca::Categories, WacApplications, WacActions, WacTags

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

void EnumerateWacCategoriesInfo( const dca_wac::WacCategoriesInfo& myCategoriesInfo )
{
// assume we have a successfully initialized myCategoriesInfo
// enumerate applications...
{
const dca_wac::WacApplications myApps = myCategoriesInfo.getApplications();
const DCA_SIZE_TYPE numOfItems = myApps.size();
for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
dca_wac::WacApplication myApp = myApps[ i ];
cout << (i+1)
<< ") Application name=" << myApp.name( "" )
<< ", description=" << myApp.description()
<< ", id=" << myApp.id() << endl;
}
}
// enumerate actions...
{
const dca_wac::WacActions myActions = myCategoriesInfo.getActions();
const DCA_SIZE_TYPE numOfItems = myActions.size();
for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
dca_wac::WacAction myAction = myActions[ i ];
cout << (i+1)
<< ") Action name=" << myAction.name( "" )
<< ", description=" << myAction.description()
<< ", id=" << myAction.id() << endl;
}
}
// enumerate tags...
{
const dca_wac::WacTags myTags = myCategoriesInfo.getTags();
const DCA_SIZE_TYPE numOfItems = myTags.size();
for( DCA_INDEX_TYPE i = 0; i < numOfItems; ++i ) {
dca_wac::WacTag myTag = myTags[ i ];
cout << (i+1)
<< ") Tag name=" << myTag.name( "" )
<< ", description=" << myTag.description()
<< ", id=" << myTag.id() << endl;
}
}
}

Definition at line 39 of file wac_categoriesinfo.h.

Public Member Functions

WacApplications getApplications () const
 Returns the contained WacApplications.
 
WacActions getActions () const
 Returns the contained WacActions.
 
WacTags getTags () const
 Returns the contained WacTags.
 

The documentation for this class was generated from the following file:
std::string description(const std::string &localeString=std::string()) const
Returns the localized (brief) description of the application.
DCA_ACTION_ID_TYPE id() const
Returns the internal id of a WacAction class.
std::string name(const std::string &localeString=std::string()) const
Returns the localized (display) name of the tag.
std::string name(const std::string &localeString=std::string()) const
Returns the localized (display) name of the application.
Definition: wac_tags.h:30
The WacAction class represents a given action of an application e.g. UPLOAD FILE, ADD ATTACHMENT,...
Definition: wac_action.h:30
std::string description(const std::string &localeString=std::string()) const
Returns the localized (brief) description of the action.
std::string description(const std::string &localeString=std::string()) const
Returns the localized (brief) description of the tag.
Definition of a container class for WacAction objects.
Definition: wac_actions.h:32
WacTags getTags() const
Returns the contained WacTags.
std::string name(const std::string &localeString=std::string()) const
Returns the localized (display) name of the action.
The WacApplication class represents a given application e.g. HOTMAIL, GMAIL etc.
WacActions getActions() const
Returns the contained WacActions.
Container class for all WAC enumeration objects.
DCA_APPLICATION_ID_TYPE id() const
Returns the internal id of a WacApplication class.
Definition of a container class for WacApplication objects.
DCA_TAG_ID_TYPE id() const
Returns the internal id of a WacTag class.
WacApplications getApplications() const
Returns the contained WacApplications.
size_t DCA_INDEX_TYPE
Type for index access (used for arrays and collections).
Definition: base_types.h:66
size_t DCA_SIZE_TYPE
Type for size (used for size of array and collections).
Definition: base_types.h:72
DCA_SIZE_TYPE size() const
Returns the number of tags in the container.
DCA_SIZE_TYPE size() const
Returns the number of applications in the container.
DCA_SIZE_TYPE size() const
Returns the number of actions in the container.
The WacTag class represents a given tag that is associated with an application e.g....
Definition: wac_tag.h:29