INTRODUCTION TO MIXINS
To extend the features of the EventDispatcher/EventQueue inheritance tree, code is injected using a mixin. EventDispatcher will be used as an example in this paper; EventQueue's functionality is identical. A mixins is a class created to add functionality to another class, typically by using a base class that already has the necessary capabilities.
The EventDispatcher's initial inheritance hierarchy looks like,
EventDispatcher <- EventDispatcherBase
After two mixin A and B are injected, the hierarchy looks like,
EventDispatcher <- MixinA <- MixinB <- EventDispatcherBase
All types, functions, and data (public and protected members) of EventDispatcherBase are accessible to mixins. The user can see and utilise every public member in the mixins.
Name | Views | Likes |
---|---|---|
Cstring-strcspn() | 140 | 0 |
Cstring.h-strcmp() | 215 | 0 |
Cstring.h-strcpy() | 153 | 0 |
Cstring.h-strlen() | 178 | 0 |
Cstring.h-strpbrk() | 124 | 0 |
Cstring.h-strrchr() | 107 | 0 |
Ctype.h – toupper() | 115 | 0 |
Ctype.h- tolower() | 124 | 0 |
Ctype.h – isxdigit() | 144 | 0 |
Ctype.h – isupper() | 115 | 0 |
Ctype.h- isspace() | 125 | 0 |
Ctype.h- ispunct() | 123 | 0 |
Ctype.h- isprint() | 104 | 0 |
Ctype.h- islower() | 132 | 0 |
Ctype.h- isdigit() | 129 | 0 |
Ctype.h- iscntrl() | 111 | 0 |
Ctype.h – isblank() | 122 | 0 |
Ctype.h – isalpha() | 128 | 0 |
Ctype.h- isalnum() | 122 | 0 |
INTRODUCTION OF ctype.h LIBRARY | 106 | 0 |
EVENT LISTENER | 129 | 0 |
Using Mixins with Eventdispacher | 103 | 0 |
INTRODUCTION TO MIXINS | 136 | 0 |
Call Back function | 149 | 0 |
Eventpp Library | 287 | 0 |
Comments