module Chem::FormatReader::Attached(T)
Overview
Declares a common interface for reading the attached object encoded in a file format. This is useful for cases when a file format also encodes an additional object but it is not part of the main content (e.g., some volumetric data file formats used in computational chemistry also include information of the molecule structure).
Including types must implement the #decode_attached : T
protected
method, where the type variable T
indicates the attached object
type. Upon parsing issues, including types are expected to raise a
ParseException
exception.
Direct including types
Defined in:
chem/format_reader.crInstance Method Summary
-
#read_attached : T
Reads the attached object from the IO.
Instance Method Detail
def read_attached : T
#
Reads the attached object from the IO. Raises IO::Error
if the
reader is closed or ParseException
if the object cannot be
decoded.