Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Data Structures | Typedefs | Functions
Data.h File Reference

Immutable data buffers. More...

#include <Objectively/Object.h>

Go to the source code of this file.

Data Structures

struct  Data
 Immutable data buffers. More...
 

Typedefs

typedef void(* DataDestructor) (ident mem)
 Data may optionally reference destructor to be called on dealloc. More...
 

Functions

OBJECTIVELY_EXPORT Class_Data (void)
 

Detailed Description

Immutable data buffers.

Definition in file Data.h.

Typedef Documentation

◆ DataDestructor

typedef void(* DataDestructor) (ident mem)

Data may optionally reference destructor to be called on dealloc.

Definition at line 43 of file Data.h.

Function Documentation

◆ _Data()

OBJECTIVELY_EXPORT Class * _Data ( void  )

Definition at line 283 of file Data.c.

283 {
284 static Class *clazz;
285 static Once once;
286
287 do_once(&once, {
288 clazz = _initialize(&(const ClassDef) {
289 .name = "Data",
290 .superclass = _Object(),
291 .instanceSize = sizeof(Data),
292 .interfaceOffset = offsetof(Data, interface),
293 .interfaceSize = sizeof(DataInterface),
295 });
296 });
297
298 return clazz;
299}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
Definition: Data.c:260
long Once
The Once type.
Definition: Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition: Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition: Class.h:41
The runtime representation of a Class.
Definition: Class.h:95
Immutable data buffers.
Definition: Data.h:50
Class * _Object(void)
The Object archetype.
Definition: Object.c:136