#include <assert.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
|
#define | get_method(C, c, m) (((const struct C*)c)->m) |
|
#define | call_method(C, m, o, ...) (get_method(C, get_class(o), m)(o __VA_OPT__(,) __VA_ARGS__)) |
|
#define | call_super_method(SC, c, m, o, ...) (get_method(SC, get_super(c), m)(o __VA_OPT__(,) __VA_ARGS__)) |
|
|
const void * | get_class (const void *self) |
|
const void * | get_super (const void *self) |
|
void * | new (void *class_p,...) |
|
void | delete (void *self) |
|
int | cmp (const void *self, const void *p) |
|
void | dump (const void *self, FILE *f) |
|
void * | object_new (void *self, va_list *) |
|
void * | object_delete (void *self) |
|
int | object_cmp (const void *self, const void *p) |
|
void | object_dump (const void *self, FILE *f) |
|
void * | class_delete (void *) |
|
void * | class_new (void *self_p, va_list *args) |
|
void * | a_new (void *self, va_list *args) |
|
void | a_dump (const void *self, FILE *f) |
|
int | a_a (const void *self) |
|
void * | a_class_new (void *self, va_list *args) |
|
void * | b_new (void *self, va_list *args) |
|
void | b_dump (const void *self, FILE *f) |
|
int | b_b (const void *self) |
|
void * | b_class_new (void *self, va_list *args) |
|
void * | c_new (void *self, va_list *args) |
|
void | c_dump (const void *self, FILE *f) |
|
int | c_c (const void *self) |
|
void * | c_class_new (void *self, va_list *args) |
|
int | main (int argc, char **argv, char **env) |
|
◆ call_method
◆ call_super_method
◆ get_method
#define get_method |
( |
| C, |
|
|
| c, |
|
|
| m ) (((const struct C*)c)->m) |
◆ a_a()
int a_a |
( |
const void * | self | ) |
|
◆ a_class_new()
void * a_class_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ a_dump()
void a_dump |
( |
const void * | self, |
|
|
FILE * | f ) |
◆ a_new()
void * a_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ b_b()
int b_b |
( |
const void * | self | ) |
|
◆ b_class_new()
void * b_class_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ b_dump()
void b_dump |
( |
const void * | self, |
|
|
FILE * | f ) |
◆ b_new()
void * b_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ c_c()
int c_c |
( |
const void * | self | ) |
|
◆ c_class_new()
void * c_class_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ c_dump()
void c_dump |
( |
const void * | self, |
|
|
FILE * | f ) |
◆ c_new()
void * c_new |
( |
void * | self, |
|
|
va_list * | args ) |
◆ class_delete()
void * class_delete |
( |
void * | | ) |
|
◆ class_new()
void * class_new |
( |
void * | self_p, |
|
|
va_list * | args ) |
◆ cmp()
int cmp |
( |
const void * | self, |
|
|
const void * | p ) |
◆ delete()
void delete |
( |
void * | self | ) |
|
◆ dump()
void dump |
( |
const void * | self, |
|
|
FILE * | f ) |
◆ get_class()
const void * get_class |
( |
const void * | self | ) |
|
◆ get_super()
const void * get_super |
( |
const void * | self | ) |
|
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv, |
|
|
char ** | env ) |
◆ new()
void * new |
( |
void * | class_p, |
|
|
| ... ) |
◆ object_cmp()
int object_cmp |
( |
const void * | self, |
|
|
const void * | p ) |
◆ object_delete()
void * object_delete |
( |
void * | self | ) |
|
◆ object_dump()
void object_dump |
( |
const void * | self, |
|
|
FILE * | f ) |
◆ object_new()
void * object_new |
( |
void * | self, |
|
|
va_list * | ) |
◆ AClass
◆ base
Initial value:= {{
.size =
sizeof(
struct Object),
}, {
.size =
sizeof(
struct Class),
}}
void * new(void *class_p,...)
Definition ooc.c:60
void * class_delete(void *)
Definition ooc.c:102
void * class_new(void *self_p, va_list *args)
Definition ooc.c:104
void * object_delete(void *self)
Definition ooc.c:89
int object_cmp(const void *self, const void *p)
Definition ooc.c:91
void * object_new(void *self, va_list *)
Definition ooc.c:88
static struct Class base[2]
Definition ooc.c:128
void object_dump(const void *self, FILE *f)
Definition ooc.c:97
const char * name
Definition ooc.c:17
◆ BClass
◆ CClass
◆ Class
struct Class* Class = base + 1 |
|
static |
◆ Object