8 #ifndef INCLUDE_MOLASSEMBLER_SERIALIZATION_H
9 #define INCLUDE_MOLASSEMBLER_SERIALIZATION_H
15 #include "Molassembler/Export.h"
18 namespace Molassembler {
95 static std::string base64Encode(
const BinaryType& binary);
96 static BinaryType base64Decode(
const std::string& base64String);
101 static bool base64EqualMolecules(
const std::string& stringA,
const std::string& stringB,
102 BinaryFormat binaryFormat = BinaryFormat::CBOR);
110 static bool equalDecisionLists(
const std::string& listStringA,
const std::string& listStringB);
136 operator std::
string() const;
140 BinaryType toBinary(BinaryFormat format) const;
168 std::unique_ptr<Impl> pImpl_;
169 static std::vector<std::tuple<
int,
int,
int,
int> > unpackDecisionListString(const std::
string& listString);
170 static std::tuple<
int,
int,
int,
int> canonicalizeDecisionListElement(const std::tuple<
int,
int,
int,
int>& decisionListElement);
171 static
bool equalVersions(const std::vector<
unsigned> versionA, const std::vector<
unsigned> versionB);
172 static std::vector<std::
string> splitBase64StringIntoMoleculeStrings(std::
string base64String);
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:85
Class representing a compact JSON serialization of a molecule.
Definition: Serialization.h:77
std::vector< std::uint8_t > BinaryType
Type used to represent binary JSON formats.
Definition: Serialization.h:82