mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 06:55:01 +00:00
df967c868b
- Plugins should be singletons across object instances * Added hard/soft initializer for r_crypto - Needed for the as_new() - Added stupid vala example for r_crypto vapi * Implement r_debug->mmu methods
42 lines
971 B
Plaintext
42 lines
971 B
Plaintext
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
|
|
- Easily interfaced with Vala thru the VAPIs
|
|
|
|
Global picture
|
|
--------------
|
|
[Class]
|
|
|
|
|
|-- [Plugins] // shared among instances
|
|
| \
|
|
| \
|
|
`------> [Instance] ----> [Liberation]
|
|
|
|
* We need a construction/destruction API for plugins among instances
|
|
- simplify code
|
|
|
|
A library implements a set of functionalities, those ones are mainly
|
|
the lifecycle of the class containing the state of
|
|
|
|
Plugins are singletons. Or we will have to create factories for every class.
|
|
|
|
Lifecycle of the class
|
|
----------------------
|
|
Class
|
|
- new
|
|
- as_new
|
|
- init
|
|
- free
|
|
|
|
Library plugins
|
|
---------------
|
|
They are stored in the p/ directory of each library under the libr directory.
|
|
|