RDKit: RDKit::MolSupplier Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
RDKit::MolSupplier Class Referenceabstract

`#include <MolSupplier.h>`

Inheritance diagram for RDKit::MolSupplier:

## Public Member Functions
| MolSupplier ()
virtual | ~MolSupplier ()
virtual void | init ()=0
virtual void | reset ()=0
virtual bool | atEnd ()=0
virtual ROMol * | next ()=0

## Protected Attributes
std::istream * | dp_inStream
bool | df_owner

## Detailed Description

Here are a couple of ways one can interact with MolSuppliers:

1) Lazy (ForwardIterator): while(!supplier.atEnd()){ ROMol *mol = supplier.next(); if(mol){ do something; } } 2) Random Access: for(int i=0;i<supplier.length();i++){ ROMol *mol = supplier[i]; if(mol){ do something; } }

Definition at line 45 of file MolSupplier.h.

## Constructor & Destructor Documentation

RDKit::MolSupplier::MolSupplier | ( |  | ) |
| inline

Definition at line 48 of file MolSupplier.h.

Referenced by ~MolSupplier().

virtual RDKit::MolSupplier::~MolSupplier | ( |  | ) |
| inlinevirtual

Definition at line 49 of file MolSupplier.h.

References atEnd(), init(), MolSupplier(), next(), and reset().

## Member Function Documentation

virtual bool RDKit::MolSupplier::atEnd | ( |  | ) |
| pure virtual

Implemented in RDKit::PDBMolSupplier, RDKit::TDTMolSupplier, RDKit::SmilesMolSupplier, RDKit::SDMolSupplier, and RDKit::ForwardSDMolSupplier.

Referenced by RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), ~MolSupplier(), RDKit::PDBMolSupplier::~PDBMolSupplier(), and RDKit::SDMolSupplier::~SDMolSupplier().

virtual void RDKit::MolSupplier::init | ( |  | ) |
| pure virtual

Implemented in RDKit::PDBMolSupplier, RDKit::TDTMolSupplier, RDKit::SmilesMolSupplier, RDKit::SDMolSupplier, and RDKit::ForwardSDMolSupplier.

Referenced by RDKit::ForwardSDMolSupplier::ForwardSDMolSupplier(), RDKit::SDMolSupplier::SDMolSupplier(), RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), ~MolSupplier(), RDKit::PDBMolSupplier::~PDBMolSupplier(), and RDKit::SDMolSupplier::~SDMolSupplier().

virtual ROMol* RDKit::MolSupplier::next | ( |  | ) |
| pure virtual

Implemented in RDKit::PDBMolSupplier, RDKit::TDTMolSupplier, RDKit::SmilesMolSupplier, RDKit::SDMolSupplier, and RDKit::ForwardSDMolSupplier.

Referenced by RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), ~MolSupplier(), RDKit::PDBMolSupplier::~PDBMolSupplier(), and RDKit::SDMolSupplier::~SDMolSupplier().

virtual void RDKit::MolSupplier::reset | ( |  | ) |
| pure virtual

Implemented in RDKit::PDBMolSupplier, RDKit::TDTMolSupplier, RDKit::SmilesMolSupplier, RDKit::SDMolSupplier, and RDKit::ForwardSDMolSupplier.

Referenced by RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), ~MolSupplier(), RDKit::PDBMolSupplier::~PDBMolSupplier(), and RDKit::SDMolSupplier::~SDMolSupplier().

## Member Data Documentation

bool RDKit::MolSupplier::df_owner
| protected

Definition at line 67 of file MolSupplier.h.

Referenced by RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), and RDKit::PDBMolSupplier::~PDBMolSupplier().

std::istream* RDKit::MolSupplier::dp_inStream
| protected

Definition at line 65 of file MolSupplier.h.

Referenced by RDKit::ForwardSDMolSupplier::~ForwardSDMolSupplier(), and RDKit::PDBMolSupplier::~PDBMolSupplier().

The documentation for this class was generated from the following file:

- MolSupplier.h