8 #include "../casters.h"
10 #include <pybind11/pybind11.h>
11 #include <pybind11/stl.h>
12 #include <pybind11/stl_bind.h>
15 using namespace pybind11::literals;
19 py::class_<ccSerializableObject>(m,
"ccSerializableObject")
33 py::class_<ccSerializationHelper>(m,
"ccSerializationHelper")
void define_ccSerializableObject(py::module &m)
void define_ccSerializationHelper(py::module &m)
static bool CorruptError()
Sends a custom error message (corrupted file) and returns 'false'.
virtual bool isSerializable() const
Returns whether object is serializable of not.
static bool ReadError()
Sends a custom error message (read error) and returns 'false'.
virtual short minimumFileVersion() const =0
Returns the minimum file version required to save this instance.
static bool WriteError()
Sends a custom error message (write error) and returns 'false'.
virtual bool toFile(QFile &out, short dataVersion) const
Saves data to binary stream.
virtual bool fromFile(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads data from binary stream.
static bool MemoryError()
Sends a custom error message (not enough memory) and returns 'false'.
static void ScalarsFromDataStream(QDataStream &stream, int flags, ScalarType *out, unsigned count=1)
static void CoordsFromDataStream(QDataStream &stream, int flags, PointCoordinateType *out, unsigned count=1)