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.
Example program MinPath.java
The following methods are publicly inherited from OEUnaryPredicate:
The following methods are publicly inherited from OEUnaryFunction:
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.
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.
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.
bool operator()(const C &arg) const
true if a pointer to the object ‘arg’ is contained in the
bool Add(const C* item)
Add a new pointer 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 OEIsMemberPtr object is dynamically allocated and owned by the caller.
template<class T> bool Set(T bgn, T end)