BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 5201ba5bba23ff80513a8e177eb05be613f85e88 / include / nucleus / object.h

// Related

Nucleus

Barry Basic object manager 5201ba5 (3 years, 3 months ago)
diff --git a/include/nucleus/object.h b/include/nucleus/object.h
new file mode 100644
index 0000000..bcd7c9a
--- /dev/null
+++ b/include/nucleus/object.h
@@ -0,0 +1,25 @@
+#ifndef _NUCLEUS_OBJECT_H
+#define _NUCLEUS_OBJECT_H
+
+typedef struct ObjectType ObjectType;
+typedef struct Object Object;
+
+/* Object Type */
+struct ObjectType {
+	unsigned int count;
+	unsigned int usage;
+	void *(*new)(void);
+	void (*delete)(Object *);
+};
+
+/* Object */
+struct Object {
+	ObjectType *type;
+	unsigned int usage;
+};
+
+void *get(void *addr);
+void put(void *addr);
+void *new(ObjectType *type);
+
+#endif