Statically defined functions.
More...
|
int | vasprintf (char **ret, const char *fmt, va_list args) |
| Allocate new formatted string. More...
|
|
int | asprintf (char **ret, const char *fmt,...) |
| Allocate new formatted string. More...
|
|
bool | isA (const void *_self, const void *class) |
| Check if object is an instance of class. More...
|
|
bool | isOf (const void *_self, const void *class) |
| Check if object is an instance of class or any derivated class. More...
|
|
void * | cast (const void *class, const void *_self) |
| Assert that object is of specified class. More...
|
|
const void * | super (const void *_class) |
| Return super class. More...
|
|
void * | method (const void *_class, const char *name) |
| Get class method. More...
|
|
const void * | classOf (const void *_self) |
| Get class of object. More...
|
|
size_t | sizeOf (const void *_self) |
| Get object's size. More...
|
|
void * | new (const void *_class,...) |
| Allocate new object. More...
|
|
void | delete (void *_self) |
| Free object. More...
|
|
void * | ref (void *_self) |
| Calls Object::__ref__() .
|
|
void | unref (void *_self) |
| Calls Object::__unref__() .
|
|
void | ooduck_init (void) |
| Initialize static types. More...
|
|
Statically defined functions.
int asprintf |
( |
char ** |
ret, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Allocate new formatted string.
- Parameters
-
ret | Address to store newly allocated string. |
fmt | Format string |
... | Argument list used to format the string. |
- Returns
- Number of characters written in string.
Calls vasprintf().
void * cast |
( |
const void * |
class, |
|
|
const void * |
self |
|
) |
| |
Assert that object is of specified class.
- Parameters
-
- Returns
- Casted object instance.
const void * classOf |
( |
const void * |
self | ) |
|
Get class of object.
- Parameters
-
- Returns
- Class object.
void delete |
( |
void * |
self | ) |
|
bool isA |
( |
const void * |
self, |
|
|
const void * |
class |
|
) |
| |
Check if object is an instance of class.
- Parameters
-
- Returns
TRUE
if object is an instance of class, FALSE
otherwise.
bool isOf |
( |
const void * |
self, |
|
|
const void * |
class |
|
) |
| |
Check if object is an instance of class or any derivated class.
- Parameters
-
- Returns
TRUE
if object is an instance of class/derivated class, FALSE
otherwise.
void * method |
( |
const void * |
class, |
|
|
const char * |
name |
|
) |
| |
Get class method.
- Parameters
-
class | Class object. |
name | Method name. |
- Returns
- Function pointer to the correct method.
void * new |
( |
const void * |
class, |
|
|
|
... |
|
) |
| |
void ooduck_init |
( |
void |
| ) |
|
size_t sizeOf |
( |
const void * |
self | ) |
|
Get object's size.
- Parameters
-
- Returns
- Object size in bytes.
const void * super |
( |
const void * |
class | ) |
|
Return super class.
- Parameters
-
- Returns
- Parent class.
int vasprintf |
( |
char ** |
ret, |
|
|
const char * |
fmt, |
|
|
va_list |
args |
|
) |
| |
Allocate new formatted string.
- Parameters
-
ret | Address to store newly allocated string. |
fmt | Format string |
args | Argument list used to format the string. |
- Returns
- Number of characters written in string.