Loading...
Searching...
No Matches
RDKit::v2::FileParsers::MolSupplier Class Referenceabstract

`#include <MolSupplier.h>`

Inheritance diagram for RDKit::v2::FileParsers::MolSupplier:

## Public Member Functions

| MolSupplier ()
virtual | ~MolSupplier ()
virtual void | init ()=0
virtual void | reset ()=0
virtual bool | atEnd ()=0
virtual std::unique_ptr< RWMol > | next ()=0
virtual void | close ()

## Protected Member Functions

std::istream * | openAndCheckStream (const std::string &filename)

## Protected Attributes

std::istream * | dp_inStream = nullptr
bool | df_owner = false

## 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 63 of file MolSupplier.h.

## Constructor & Destructor Documentation

## MolSupplier()

RDKit::v2::FileParsers::MolSupplier::MolSupplier | ( |  | ) |

inline

Definition at line 66 of file MolSupplier.h.

## ~MolSupplier()

virtual RDKit::v2::FileParsers::MolSupplier::~MolSupplier | ( |  | ) |

inline virtual

Definition at line 67 of file MolSupplier.h.

## Member Function Documentation

## atEnd()

virtual bool RDKit::v2::FileParsers::MolSupplier::atEnd | ( |  | ) |

pure virtual

Implemented in RDKit::v2::FileParsers::ForwardSDMolSupplier, RDKit::v2::FileParsers::SDMolSupplier, RDKit::v2::FileParsers::SmilesMolSupplier, and RDKit::v2::FileParsers::TDTMolSupplier.

## close()

virtual void RDKit::v2::FileParsers::MolSupplier::close | ( |  | ) |

inline virtual

Definition at line 73 of file MolSupplier.h.

References df_owner, and dp_inStream.

Referenced by RDKit::v2::FileParsers::ForwardSDMolSupplier::~ForwardSDMolSupplier(), RDKit::v2::FileParsers::SDMolSupplier::~SDMolSupplier(), RDKit::v2::FileParsers::SmilesMolSupplier::~SmilesMolSupplier(), and RDKit::v2::FileParsers::TDTMolSupplier::~TDTMolSupplier().

## init()

virtual void RDKit::v2::FileParsers::MolSupplier::init | ( |  | ) |

pure virtual

Implemented in RDKit::v2::FileParsers::ForwardSDMolSupplier, RDKit::v2::FileParsers::SDMolSupplier, RDKit::v2::FileParsers::SmilesMolSupplier, and RDKit::v2::FileParsers::TDTMolSupplier.

## next()

virtual std::unique_ptr< RWMol > RDKit::v2::FileParsers::MolSupplier::next | ( |  | ) |

pure virtual

Implemented in RDKit::v2::FileParsers::ForwardSDMolSupplier, RDKit::v2::FileParsers::SDMolSupplier, RDKit::v2::FileParsers::SmilesMolSupplier, and RDKit::v2::FileParsers::TDTMolSupplier.

## openAndCheckStream()

std::istream * RDKit::v2::FileParsers::MolSupplier::openAndCheckStream | ( | const std::string & | filename | ) |

inline protected

Definition at line 97 of file MolSupplier.h.

## reset()

virtual void RDKit::v2::FileParsers::MolSupplier::reset | ( |  | ) |

pure virtual

Implemented in RDKit::v2::FileParsers::ForwardSDMolSupplier, RDKit::v2::FileParsers::SDMolSupplier, RDKit::v2::FileParsers::SmilesMolSupplier, and RDKit::v2::FileParsers::TDTMolSupplier.

## Member Data Documentation

## df_owner

bool RDKit::v2::FileParsers::MolSupplier::df_owner = false

protected

Definition at line 93 of file MolSupplier.h.

Referenced by close().

## dp_inStream

std::istream* RDKit::v2::FileParsers::MolSupplier::dp_inStream = nullptr

protected

Definition at line 91 of file MolSupplier.h.

Referenced by close().

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

- MolSupplier.h