12#ifndef RD_RXNPICKLE_H_2JUNE2009
13#define RD_RXNPICKLE_H_2JUNE2009
25class ChemicalReaction;
29 :
public std::exception {
33 const char *
what() const noexcept
override {
return _msg.c_str(); }
68 unsigned int propertyFlags);
71 ReactionPickler::pickleReaction(&rxn, ss);
74 unsigned int propertyFlags) {
75 ReactionPickler::pickleReaction(&rxn, ss, propertyFlags);
79 unsigned int propertyFlags);
82 ReactionPickler::pickleReaction(&rxn, res);
85 unsigned int propertyFlags) {
86 ReactionPickler::pickleReaction(&rxn, res, propertyFlags);
95 ReactionPickler::reactionFromPickle(pickle, &rxn);
102 ReactionPickler::reactionFromPickle(ss, &rxn);
108 unsigned int propertyFlags);
111 static void _depickle(std::istream &ss,
ChemicalReaction *rxn,
int version);
114 static void _pickleProperties(std::ostream &ss,
const RDProps &props,
115 unsigned int pickleFlags);
117 static void _unpickleProperties(std::istream &ss,
RDProps &props);
This is a class for storing and applying general chemical reactions.
used to indicate exceptions whilst pickling (serializing) reactions
~ReactionPicklerException() noexcept override=default
const char * what() const noexcept override
ReactionPicklerException(const char *msg)
ReactionPicklerException(const std::string msg)
handles pickling (serializing) reactions
static const std::int32_t endianId
mark the endian-ness of the pickle
static void pickleReaction(const ChemicalReaction &rxn, std::ostream &ss)
static void pickleReaction(const ChemicalReaction &rxn, std::ostream &ss, unsigned int propertyFlags)
static void reactionFromPickle(const std::string &pickle, ChemicalReaction *rxn)
static const std::int32_t versionMajor
mark the pickle version
static void pickleReaction(const ChemicalReaction *rxn, std::string &res)
static void reactionFromPickle(std::istream &ss, ChemicalReaction &rxn)
static void pickleReaction(const ChemicalReaction &rxn, std::string &res)
static void pickleReaction(const ChemicalReaction &rxn, std::string &res, unsigned int propertyFlags)
static const std::int32_t versionPatch
mark the pickle version
static void reactionFromPickle(std::istream &ss, ChemicalReaction *rxn)
static void pickleReaction(const ChemicalReaction *rxn, std::ostream &ss, unsigned int propertyFlags)
pickles a reaction and sends the results to stream ss
static const std::int32_t versionMinor
mark the pickle version
static void pickleReaction(const ChemicalReaction *rxn, std::string &res, unsigned int propertyFlags)
pickles a reaction and adds the results to string res
static void pickleReaction(const ChemicalReaction *rxn, std::ostream &ss)
static void reactionFromPickle(const std::string &pickle, ChemicalReaction &rxn)
#define RDKIT_CHEMREACTIONS_EXPORT