4.104 OENewMolBase

OEMolBase   *OENewMolBase(unsigned int type=OEMolBaseType::OEDefault)
OEMolBase   *OENewMolBase(const OEMolBase &mol,
                          unsigned int type=OEMolBaseType::OEDefault)

The OENewMolBase factory methods allocate an implementation of an OEMolBase based on the the integer 'type' argument. The 'type' argument specifies the implementation type to be allocated, and should be one of the values listed in namespace OEMolBaseType. The returned molecule may be copy constructed from an existing OEMolBase instance. The pointer to the OEMolBase memory returned by the function is allocated dynamically. The OEMolBase::delete operator must be called for all returned instances to prevent memory leaks.