OODuck  0.5
C Oriented Object framework with duck-typing support
Class Class Reference

Class used to build new class dynamically. More...

Inheritance diagram for Class:
Object Singleton

Public Member Functions

bool __alloc__ (void *class, void **instance)
 Allocate memory for new instance. More...
 
void * __constructor__ (void *self, va_list *app)
 Build new instance. More...
 
void * __destructor__ (void *self)
 Destroy instance. More...
 
- Public Member Functions inherited from Object
void * ref (void *self)
 Increment object's reference counter. More...
 
void unref (void *self)
 Decrement object's reference counter, if equals 0, delete the object. More...
 
bool equal (const void *self, const void *other)
 Check objects equality. More...
 

Detailed Description

Class used to build new class dynamically.

Member Function Documentation

bool __alloc__ ( void *  class,
void **  instance 
)

Allocate memory for new instance.

Parameters
classObject class.
instanceAddress to store newly allocated object
Returns
TRUE if allocation was done, FALSE otherwise.
void * __constructor__ ( void *  self,
va_list *  app 
)

Build new instance.

Parameters
selfObject instance.
appConstructor parameters.
Returns
Initialized instance.
void * __destructor__ ( void *  self)

Destroy instance.

Parameters
selfObject instance.
Returns
Instance.