2009-09-15 11:24:28 +00:00
|
|
|
Radare OO
|
|
|
|
=========
|
|
|
|
|
|
|
|
I do realize that Object Orientation sucks, so I tried to do libr API
|
|
|
|
following some sane and basic OO concepts.
|
|
|
|
|
|
|
|
- No inheritance
|
|
|
|
- Instances are used to keep states
|
|
|
|
- Enforces instance recycling
|
|
|
|
- Reduce creation/destruction of objects
|
2019-06-18 05:13:08 +00:00
|
|
|
- Easily interfaced with Vala through the VAPIs
|
2009-09-15 11:24:28 +00:00
|
|
|
|
|
|
|
Global picture
|
|
|
|
--------------
|
2018-02-27 09:54:54 +00:00
|
|
|
|
|
|
|
```
|
2009-09-15 11:24:28 +00:00
|
|
|
[Class]
|
|
|
|
|
|
|
|
|
|-- [Plugins] // shared among instances
|
|
|
|
| \
|
|
|
|
| \
|
|
|
|
`------> [Instance] ----> [Liberation]
|
2018-02-27 09:54:54 +00:00
|
|
|
```
|
2009-09-15 11:24:28 +00:00
|
|
|
|
|
|
|
* We need a construction/destruction API for plugins among instances
|
|
|
|
- simplify code
|
|
|
|
|
|
|
|
A library implements a set of functionalities, those ones are mainly
|
2021-12-02 16:39:59 +00:00
|
|
|
the lifecycle of the class containing the state of
|
2009-09-15 11:24:28 +00:00
|
|
|
|
|
|
|
Plugins are singletons. Or we will have to create factories for every class.
|
|
|
|
|
|
|
|
Lifecycle of the class
|
|
|
|
----------------------
|
2018-02-27 09:54:54 +00:00
|
|
|
|
|
|
|
Class
|
2009-09-15 11:24:28 +00:00
|
|
|
- new
|
|
|
|
- as_new
|
|
|
|
- init
|
|
|
|
- free
|
|
|
|
|
|
|
|
Library plugins
|
|
|
|
---------------
|
|
|
|
They are stored in the p/ directory of each library under the libr directory.
|
|
|
|
|