Basic (private) services for object-oriented design. More...
#include <object_private.h>
Data Fields | |
VIRTUAL Object_ptr(* | copy )(const Object_ptr self) |
VIRTUAL void(* | finalize )(Object_ptr self, void *arg) |
Related Functions | |
(Note that these are not member functions.) | |
VIRTUAL Object_ptr | Object_copy (const Object_ptr self) |
Class virtual copy constructor. | |
void | object_copy_aux (const Object_ptr self, Object_ptr copy) |
Copy costructor auxiliary private method. | |
void | object_deinit (Object_ptr self) |
Class private deinizializer. | |
VIRTUAL void | Object_destroy (Object_ptr self, void *arg) |
Class virtual destructor. | |
void | object_init (Object_ptr self) |
Class private inizializer. |
Basic (private) services for object-oriented design.
Basic services for object-oriented design.
VIRTUAL Object_ptr Object_copy | ( | const Object_ptr | self | ) | [related] |
Class virtual copy constructor.
Call this by passing any class instance derived from Object. Cast the result to the real class type to assign the returned value. Since Object is a virtual class, it cannot be really instantiated. This means that the copy constructor must be implemented by derived class if the copy is a needed operation.
void object_copy_aux | ( | const Object_ptr | self, | |
Object_ptr | copy | |||
) | [related] |
Copy costructor auxiliary private method.
This must be called by any derived class auxiliary copy constructor *before* any other operation.
void object_deinit | ( | Object_ptr | self | ) | [related] |
Class private deinizializer.
Must be called by derived class inizializer *after* any other operation. The deinizializer in derived class must be called only by the finalizer (which is called the destructor). No other operation is allowed on the instance is being to be destroyed.
VIRTUAL void Object_destroy | ( | Object_ptr | self, | |
void * | arg | |||
) | [related] |
Class virtual destructor.
Class virtual destructor. Call this to destroy any instance of any derived class.
void object_init | ( | Object_ptr | self | ) | [related] |
Class private inizializer.
This private method must be called by derived class inizializer *before* any other operation
VIRTUAL Object_ptr(* Object::copy)(const Object_ptr self) |
VIRTUAL void(* Object::finalize)(Object_ptr self, void *arg) |