nps/Object.h File Reference
#include <stdarg.h>
#include <stdlib.h>
#include "../error/error.h"
Go to the source code of this file.
Classes |
struct | Object |
struct | Class |
Defines |
#define | CAST(cls, val) (struct cls *) nps_cast(cls,(struct Object *)val) |
#define | NEW(cls, nps_err,...) ((struct cls*) nps_new((struct Class *)cls, nps_err, __VA_ARGS__)) |
#define | RELEASE(val, error) nps_release(CAST(Object,val),error) |
#define | RETAIN(val) nps_retain(CAST(Object,val)) |
Functions |
void | nps_initObject () |
int | nps_releaseClasses (nps_error_t *error) |
struct Object * | nps_cast (const struct Class *to, struct Object *val) |
void | nps_retain (struct Object *o) |
int | nps_release (struct Object *o, nps_error_t *err) |
struct Object * | nps_new (const struct Class *class, nps_error_t *err,...) |
Variables |
struct Class | Object [] |
struct Class | Class [] |
Define Documentation
#define CAST |
( |
cls, |
|
|
val |
|
) |
(struct cls *) nps_cast(cls,(struct Object *)val) |
#define NEW |
( |
cls, |
|
|
nps_err, |
|
|
... |
|
) |
((struct cls*) nps_new((struct Class *)cls, nps_err, __VA_ARGS__)) |
#define RELEASE |
( |
val, |
|
|
error |
|
) |
nps_release(CAST(Object,val),error) |
#define RETAIN |
( |
val |
|
) |
nps_retain(CAST(Object,val)) |
Function Documentation
void nps_retain |
( |
struct Object * |
o |
) |
|
Variable Documentation