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

Singleton metaclass. More...

Inheritance diagram for Singleton:
Class Object

Additional Inherited Members

- Public Member Functions inherited from Class
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

Singleton metaclass.

This is used to build classes with one instance only.

First call to new() with a Singleton class will create the instance and call the constructor. Then, new() will return the allocated object, ignoring arguments.