ChibiOS/HAL  6.1.0
Collaboration diagram for Base Object:

Detailed Description

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.

Macros

#define _base_object_methods
 BaseObject specific methods. More...
 
#define _base_object_data
 BaseObject specific data. More...
 

Macro Functions (BaseObject)

#define objGetInstance(type, ip)   (type)(((size_t)(ip)) - (ip)->vmt->instance_offset)
 Returns the instance pointer starting from an interface pointer. More...
 

Data Structures

struct  BaseObjectVMT
 BaseObject virtual methods table. More...
 
struct  BaseObject
 Base stream class. More...
 

Macro Definition Documentation

#define _base_object_methods
Value:
/* Instance offset, used for multiple inheritance, normally zero. It
represents the offset between the current object and the container
object*/ \
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

BaseObject specific data.

Note
This object defines no data.

Definition at line 49 of file hal_objects.h.

#define objGetInstance (   type,
  ip 
)    (type)(((size_t)(ip)) - (ip)->vmt->instance_offset)

Returns the instance pointer starting from an interface pointer.

Parameters
[in]typethe type of the instance pointer, it is used for casting
[in]ipthe interface pointer
Returns
A pointer to the object implementing the interface

Definition at line 80 of file hal_objects.h.