nstool/lib/libfnd/include/fnd/ISerialisable.h

21 lines
359 B
C
Raw Normal View History

#pragma once
#include <fnd/types.h>
#include <fnd/Vec.h>
namespace fnd
{
class ISerialisable
{
public:
// serialise
virtual void toBytes() = 0;
// deserialise
virtual void fromBytes(const byte_t* data, size_t len) = 0;
// get byte vector
virtual const fnd::Vec<byte_t>& getBytes() const = 0;
// clear data
virtual void clear() = 0;
};
}