38typedef struct DataInterface DataInterface;
89 ObjectInterface objectInterface;
100 Data *(*dataWithBytes)(
const uint8_t *bytes,
size_t length);
111 Data *(*dataWithConstMemory)(
const ident mem,
size_t length);
121 Data *(*dataWithContentsOfFile)(
const char *path);
132 Data *(*dataWithMemory)(
ident mem,
size_t length);
143 Data *(*initWithBytes)(
Data *self,
const uint8_t *bytes,
size_t length);
154 Data *(*initWithConstMemory)(
Data *self,
const ident mem,
size_t length);
164 Data *(*initWithContentsOfFile)(
Data *self,
const char *path);
175 Data *(*initWithMemory)(
Data *self,
ident mem,
size_t length);
static _Bool writeToFile(const Data *self, const char *path)
void(* DataDestructor)(ident mem)
Data may optionally reference destructor to be called on dealloc.
Object is the root Class of The Objectively Class hierarchy.
void * ident
The identity type, similar to Objective-C id.
#define OBJECTIVELY_EXPORT
The runtime representation of a Class.
Class * _Data(void)
The Data archetype.
DataInterface * interface
The interface.
DataDestructor destroy
An optional destructor that, if set, is called on dealloc.
Object object
The superclass.
size_t length
The length of bytes.
uint8_t * bytes
The bytes.
Object is the root Class of The Objectively Class hierarchy.