class OEHasRole : public OESystem::OEUnaryPredicate<OERoleSet>
OEHasRole pred(role); if (pred(frag)) std::cout << "has role: " << role.GetName() << std::endl;
The following methods are publicly inherited from OEUnaryPredicate:
The following methods are publicly inherited from OEUnaryFunction:
OEHasRole(const OERole &role)
OEHasRole(const std::string &name)
Convenience constructor allowing the predicate to be constructed from a role name string.
bool operator()(const OERoleSet &myObject) const
OESystem::OEUnaryFunction<OERoleSet , bool> *CreateCopy() const
Deep copy constructor that returns a copy of the object. The memory for the returned OEHasRole object is dynamically allocated and owned by the caller.
The returned copy should be managed to ensure it is deallocated using C++ delete operator in order to prevent a memory leak.