OEPartPredT¶

template<class T>
class OEPartPredT : public OESystem::OEUnaryPredicate<T>


This class represents OEPartPredT template functor that holds multiple parts of a molecule and identifies objects (that provide GetIdx method such as OEAtomBase, OEBondBase) that belong to different part of a molecule based on the state of the functor.

The following methods are publicly inherited from OEUnaryPredicate:

The following methods are publicly inherited from OEUnaryFunction:

The following specialization exists for this template:

Specialized Functor Definition
OEPartPredAtom OEPartPredT <OEAtomBase>

Constructors¶

OEPartPredT(unsigned int *parts, unsigned int size)


Constructs the functor where the parts are specified in the passed integer array (‘parts’), the size of the ‘parts’ array is is specified by the ‘size’ argument.

If the OEPartPredT is used to identify atoms (OEAtomBase), then ‘parts’ array is assumed to be of length equal to the number return by the OEMolBase.GetMaxAtomIdx method, where parts[atom. GetIdx() ] is the integer associated with the part to which atom belongs.

OEPartPredT(const OEPartPredT &rhs)


Copy constructor.

operator=¶

OEPartPredT &operator=(const OEPartPredT &rhs)


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

operator()¶

bool operator()(const T &t) const


If the OEPartPredT is used to identify atoms, then this method returns true, if parts[ atom. GetIdx() ] == part, where ‘parts’ is the array passed on construction, and ‘part’ is the argument set by the OEPartPredT.SelectPart method.

CreateCopy¶

OESystem::OEUnaryFunction<T, bool> *CreateCopy() const


Deep copy constructor that returns a copy of the object. The memory for the returned OEPartPredT object is dynamically allocated and owned by the caller.

SelectPart¶

void SelectPart(unsigned int part)


Sets the ‘part’ argument that is used to select a specific part of a molecule.