8 #ifndef INCLUDE_MOLASSEMBLER_SERIALIZATION_H
9 #define INCLUDE_MOLASSEMBLER_SERIALIZATION_H
16 #include "Molassembler/Export.h"
19 namespace Molassembler {
140 operator std::string()
const;
172 std::unique_ptr<Impl> pImpl_;
173 static std::vector<std::tuple<int, int, int, int> > unpackDecisionListString(
const std::string& listString);
174 static std::tuple<int, int, int, int> canonicalizeDecisionListElement(
const std::tuple<int, int, int, int>& decisionListElement);
175 static bool equalVersions(
const std::vector<unsigned> versionA,
const std::vector<unsigned> versionB);
176 static std::vector<std::string> splitBase64StringIntoMoleculeStrings(std::string base64String);
177 static bool compareMoleculeDecisionList(
const std::vector<std::tuple<int, int, int, int>>& listA,
178 const std::vector<std::tuple<int, int, int, int>>& listB);
Class representing a compact JSON serialization of a molecule.
Definition: Serialization.h:79
JsonSerialization & standardize()
Eliminate all notational freedom of the JSON serialization.
static BinaryType base64Decode(const std::string &base64String)
Compare two molecules/complexes encoded as base64 strings. The molecule order is irrelevant.
JsonSerialization()=delete
Construct a serialization from a JSON string.
JsonSerialization(const BinaryType &binary, BinaryFormat format)
Construct a serialization from a binary JSON format.
BinaryFormat
Binary formats that JSON can be encoded into and decoded from.
Definition: Serialization.h:87
JsonSerialization(const Molecule &molecule)
Construct a serialization from a Molecule.
static std::string base64Encode(const BinaryType &binary)
Compare two molecules/complexes encoded as base64 strings. The molecule order is irrelevant.
static bool base64EqualMolecules(const std::string &stringA, const std::string &stringB, BinaryFormat binaryFormat=BinaryFormat::CBOR)
Compare two molecules/complexes encoded as base64 strings. The molecule order is irrelevant.
BinaryType toBinary(BinaryFormat format) const
Serialize the JSON serialization into a binary JSON format.
std::vector< std::uint8_t > BinaryType
Type used to represent binary JSON formats.
Definition: Serialization.h:84
JsonSerialization(const std::string &jsonString)
Construct a serialization from a JSON string.
static bool equalDecisionLists(const std::string &listStringA, const std::string &listStringB)
Compare two decision lists encoded as strings.
Models a molecule as a graph (connectivity of atoms) and a list of stereopermutators.
Definition: Molecule.h:77