HAL uses concepts of Object Oriented Programming even if it is written in C. Things like simple inheritance, multiple inheritance and interfaces are used through the system. This module defines a "base object" that is the ancestor of all classes in the system.
|
#define | objGetInstance(type, ip) (type)(((size_t)(ip)) - (ip)->vmt->instance_offset) |
| Returns the instance pointer starting from an interface pointer. More...
|
|
#define _base_object_methods |
Value: \
size_t instance_offset;
BaseObject
specific methods.
- Note
- This object defines no methods.
Definition at line 39 of file hal_objects.h.
#define _base_object_data |
#define objGetInstance |
( |
|
type, |
|
|
|
ip |
|
) |
| (type)(((size_t)(ip)) - (ip)->vmt->instance_offset) |
Returns the instance pointer starting from an interface pointer.
- Parameters
-
[in] | type | the type of the instance pointer, it is used for casting |
[in] | ip | the interface pointer |
- Returns
- A pointer to the object implementing the interface
Definition at line 80 of file hal_objects.h.