# OEIsMember¶

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:

## Constructors¶

OEIsMember()


Default constructors.

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.

OEIsMember(OESystem::OEIter<C> &i)


Constructs the functor using an iterator (OEIter) over values of the same type as the functor template argument.

OEIsMember(OESystem::OEIterBase<C> *i)


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.

## operator=¶

OEIsMember<C> &operator=(const OEIsMember<C> &rhs)


Assignment operator that copies the data of the ‘rhs’ OEIsMember object into the right-hand side OEIsMember object.

## operator()¶

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.

## CreateCopy¶

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.

## Set¶

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.