template<class C> class OEIsMember : public OESystem::OEUnaryPredicate<C>
This class represents OEIsMember template functor that identifies all of the objects which are in an STL container.
The following methods are publicly inherited from OEUnaryPredicate:
The following methods are publicly inherited from OEUnaryFunction:
OEIsMember(std::set<C> &v) OEIsMember(std::list<C> &v) OEIsMember(std::deque<C> &v) OEIsMember(std::vector<C> &v)
Constructs the functor using an STL container of type ‘C’, which contains objects or pointers to objects. Any of the elements of the STL container will be considered to be ‘a member’ of the functor.
Constructs the functor using an iterator (OEIter) over values of the same type as the functor template argument.
Constructs the functor using an iterator (OEIterBase) over values of the same type as the functor template argument.
template<class T> OEIsMember(T bgn, T end)
Constructs the functor using a sequence of values. The values from ‘bgn’ up to, but not including, ‘end’ are used to construct the functor. Using this constructor, the functor may be constructed from arrays and STL containers.
OEIsMember<C> &operator=(const OEIsMember<C> &rhs)
bool operator()(const C &arg) const
Returns true if the object arg (or a pointer to arg) is contained in the STL container passed to the functor on construction.
bool Add(C& item)
Add a new element to be considered as ‘a member’ of the functor.
OESystem::OEUnaryPredicate<C> *CreateCopy() const
Deep copy constructor that returns a copy of the object. The memory for the returned OEIsMember object is dynamically allocated and owned by the caller.
The returned copy should be deallocated using C++ delete operator in order to prevent a memory leak.
template<class T> bool Set(T bgn, T end)
All elements specified by the given iterators will be considered to be ‘a member’ of the functor.