NuriKit v0.1.0b2
Loading...
Searching...
No Matches
nuri::MmcifReader Class Referencefinal

#include <nuri/fmt/mmcif.h>

Inheritance diagram for nuri::MmcifReader:
Collaboration diagram for nuri::MmcifReader:

Public Member Functions

 MmcifReader (std::istream &is)
bool getnext (std::vector< std::string > &block) override
 Advance the reader to the next molecule.
Molecule parse (const std::vector< std::string > &block) const override
 Parse the current block and return the molecule.
bool bond_valid () const override
 Test whether the reader implementation can provide valid bond information.
Public Member Functions inherited from nuri::MoleculeReader
 MoleculeReader ()=default
 MoleculeReader (const MoleculeReader &)=delete
MoleculeReaderoperator= (const MoleculeReader &)=delete
 MoleculeReader (MoleculeReader &&) noexcept=default
MoleculeReaderoperator= (MoleculeReader &&) noexcept=default
virtual ~MoleculeReader () noexcept=default
std::vector< std::string > next ()
 Advance the reader to the next molecule.
MoleculeStream< MoleculeReaderstream ()
 Convert the reader to a stream object.

Constructor & Destructor Documentation

◆ MmcifReader()

nuri::MmcifReader::MmcifReader ( std::istream & is)
inlineexplicit

Member Function Documentation

◆ bond_valid()

bool nuri::MmcifReader::bond_valid ( ) const
inlineoverridevirtual

Test whether the reader implementation can provide valid bond information.

Implements nuri::MoleculeReader.

◆ getnext()

bool nuri::MmcifReader::getnext ( std::vector< std::string > & block)
overridevirtual

Advance the reader to the next molecule.

Parameters
blockThe block containing the next molecule. If true is returned, pre-existing contents of the block are discarded. Otherwise, the block is in a valid but unspecified state.
Returns
true if the reader has successfully advanced to the next molecule, false otherwise.
Note
The name of this method is loosely based on the std::getline() function due to its similar semantics. The name also prevents name collision with the (non-virtual) next() method when subclasses override this method.

Implements nuri::MoleculeReader.

◆ parse()

Molecule nuri::MmcifReader::parse ( const std::vector< std::string > & block) const
overridevirtual

Parse the current block and return the molecule.

Parameters
blockThe block to parse.
Returns
The current molecule.
Note
The returned molecule will be empty if the block is empty.

Implements nuri::MoleculeReader.


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