Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Chem.ReactionInputHandler Class Reference

A factory interface providing methods for the creation of Chem.ReactionReaderBase instances for reading data provided in a particular storage format. More...

+ Inheritance diagram for CDPL.Chem.ReactionInputHandler:

Public Member Functions

None __init__ ()
 Initializes the ReactionInputHandler instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
Base.DataFormat getDataFormat ()
 Returns a Base.DataFormat object that provides information about the handled input data format. More...
 
ReactionReaderBase createReader (Base.IStream is)
 Creates a ReactionReaderBase instance that will read the data from the input stream is. More...
 
ReactionReaderBase createReader (str file_name, OpenMode mode=Base.IOStream.OpenMode(12))
 Creates a ReactionReaderBase instance that will read the data from the file specified by file_name. More...
 

Properties

 objectID = property(getObjectID)
 

Detailed Description

A factory interface providing methods for the creation of Chem.ReactionReaderBase instances for reading data provided in a particular storage format.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.ReactionInputHandler.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python ReactionInputHandler instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two ReactionInputHandler instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ getDataFormat()

Base.DataFormat CDPL.Chem.ReactionInputHandler.getDataFormat ( )

Returns a Base.DataFormat object that provides information about the handled input data format.

Returns
A Base.DataFormat object that provides information about the handled data format.

◆ createReader() [1/2]

ReactionReaderBase CDPL.Chem.ReactionInputHandler.createReader ( Base.IStream  is)

Creates a ReactionReaderBase instance that will read the data from the input stream is.

Parameters
isThe input stream to read from.
Returns
The created ReactionReaderBase instance.

◆ createReader() [2/2]

ReactionReaderBase CDPL.Chem.ReactionInputHandler.createReader ( str  file_name,
OpenMode   mode = Base.IOStream.OpenMode(12) 
)

Creates a ReactionReaderBase instance that will read the data from the file specified by file_name.

Parameters
file_nameThe full path of the file to read from.
modeFlags specifying the file open-mode.
Returns
The created ReactionReaderBase instance.