# OEIsMemberPtr¶

template<class C>
class OEIsMemberPtr : public OESystem::OEUnaryPredicate<C>


This class represents OEIsMemberPtr template functor that performs set membership tests. This functor differs from the OEIsMember functor in that the internal storage type differs from the test type. While instances of abstract classes cannot be easily stored, however, pointers to abstract class instances do not pose the same storage problems. OEIsMemberPtr stores pointers to data types, while the template type of the class is a single dereferenced version of the storage type.

The following methods are publicly inherited from OEUnaryPredicate:

The following methods are publicly inherited from OEUnaryFunction:

The following specializations exist for this template:

Specialized Functor Definition
OEIsAtomMember OEIsMemberPtr < OEAtomBase >
OEIsBondMember OEIsMemberPtr < OEBondBase >

## Constructors¶

OEIsMemberPtr()


Default constructor.

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


Constructs the functor using an iterator (OEIter) over values of the same type as the functor template argument. Addresses instead of instances or references to the data are stored internally.

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


Constructs the functor using an iterator (OEIterBase) over values of the same type as the functor template argument. Addresses instead of instances or references to the data are stored internally.

template<class T>  OEIsMemberPtr(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=¶

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


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

## operator()¶

bool operator()(const C &arg) const


Returns true if a pointer to the object ‘arg’ is contained in the functor.

bool Add(const C* item)


Add a new pointer 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 OEIsMemberPtr object is dynamically allocated and owned by the caller.

## Set¶

template<class T>
bool Set(T bgn, T end)