class OERoleSet

This class represents OERoleSet, a parent class for objects that need to store OERole objects.

An OERole is an object that helps define a classification (naming) scheme to represent a category or functional role.

Objects derived from OERoleSet can have OERole objects added to them as a way of marking them for particular uses.

The following classes derive from this class:

It is possible to test if an OERole has been added using the HasRole method, or with the OEHasRole predicate.


bool AddRole(const OERole &role)

Add the specified OERole to this OERoleSet. Returns true if successful.

bool AddRole(const std::string &name)

Convenience method for adding a OERole by name.


void ClearRoles()

Delete all the OERole objects from this OERoleSet.


bool DeleteRole(const OERole &role)
bool DeleteRole(const std::string &name)

Delete the specified OERole from this OERoleSet. Returns true if successful.


OEIterBase<const OERole> *GetRoles() const

Returns an iterator of every OERole object in this OERoleSet.


bool HasRole(const OERole &role) const

Returns true if the OERoleSet contains the specified role.

bool HasRole(const std::string &name) const

Convenience method for testing membership with a string.


unsigned int NumRoles() const

Returns the current number of OERole objects in this OERoleSet.