RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::v2::FileParsers::MolSupplier Class Referenceabstract

#include <MolSupplier.h>

Inheritance diagram for RDKit::v2::FileParsers::MolSupplier:
RDKit::v2::FileParsers::ForwardSDMolSupplier RDKit::v2::FileParsers::SmilesMolSupplier RDKit::v2::FileParsers::TDTMolSupplier RDKit::v2::FileParsers::SDMolSupplier

Public Member Functions

 MolSupplier ()
 
virtual ~MolSupplier ()
 
virtual void init ()=0
 
virtual void reset ()=0
 
virtual bool atEnd ()=0
 
virtual std::unique_ptr< RWMolnext ()=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 ( )
inlinevirtual

Definition at line 67 of file MolSupplier.h.

Member Function Documentation

◆ atEnd()

◆ close()

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

Definition at line 73 of file MolSupplier.h.

◆ init()

◆ next()

◆ openAndCheckStream()

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

Definition at line 97 of file MolSupplier.h.

◆ reset()

Member Data Documentation

◆ df_owner

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

Definition at line 93 of file MolSupplier.h.

◆ dp_inStream

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

Definition at line 91 of file MolSupplier.h.


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