8 #ifndef INCLUDE_MOLASSEMBLER_SERIALIZATION_H
9 #define INCLUDE_MOLASSEMBLER_SERIALIZATION_H
16 #include "Molassembler/Export.h"
19 namespace Molassembler {
97 static std::string base64Encode(
const BinaryType& binary);
98 static BinaryType base64Decode(
const std::string& base64String);
104 static bool base64EqualMolecules(
const std::string& stringA,
const std::string& stringB,
105 BinaryFormat binaryFormat = BinaryFormat::CBOR);
114 static bool equalDecisionLists(
const std::string& listStringA,
const std::string& listStringB);
140 operator std::
string() const;
144 BinaryType toBinary(BinaryFormat format) 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);
Models a molecule as a graph (connectivity of atoms) and a list of stereopermutators.
Definition: Molecule.h:77
BinaryFormat
Binary formats that JSON can be encoded into and decoded from.
Definition: Serialization.h:87
Class representing a compact JSON serialization of a molecule.
Definition: Serialization.h:79
std::vector< std::uint8_t > BinaryType
Type used to represent binary JSON formats.
Definition: Serialization.h:84