class OEIdxSelected : public OESystem::OEUnaryPredicate<Arg>
This class represents OEIdxSelected, a template functor that identifies objects
which provide a
GetIdx method and have been selected by index in the
boolean array or vector or OEBitVector used
to initialize the class.
The following methods are publicly inherited from OEUnaryPredicate:
The following methods are publicly inherited from OEUnaryFunction:
The following specializations exist for this template:
OEIdxSelected(const OESystem::OEBitVector &bv)
Construct the functor from an OEBitVector (call it bv)
where the selection state of the object with internal index i is stored at bv[i]
bv.SetBitOn(atom.GetIdx())). The caller is responsible for making sure that
the input OEBitVector is sufficient size to refer to the maximum
index value of the objects it will be applied to.
The selection states are copied into an internal representation and the OEBitVector can be deleted before the functor is called.
bool operator()(const Arg &a) const
true, if the state of the
OEBitVector used to construct
the functor at the index returned by the
Arg.GetIdx() method is
OETYPENAME OESystem::OEUnaryFunction<Arg, bool> *CreateCopy() const
Deep copy constructor that returns a copy of the object. The memory for the returned OEIdxSelected object is dynamically allocated and owned by the caller.