diff --git a/README.md b/README.md index cb6c35a4..8db3436c 100644 --- a/README.md +++ b/README.md @@ -375,6 +375,13 @@ and the function that performs this operation. Without an oplist, M\*LIB has no way to known how to deal with your type and will deal with it like a classic C type. +When you define an instance of a new container, you give the oplist of the type +you want to use as the base of the container. In function of the available interface +of the oplist, the generation macro function generates the interface of the container. +Then using the oplist of the container you can chain this new interface to another +container: +![oplist and definition](https://raw.githubusercontent.com/P-p-H-d/mlib/master/doc/oplist.png) + A function name can be followed by the token M\_IPTR in the oplist (for example: (INIT(init\_func M\_IPTR)) ) to specify that the function accept as its *first* argument a pointer diff --git a/doc/Container.ods b/doc/Container.ods index 2206d0b3..304fe5ef 100644 Binary files a/doc/Container.ods and b/doc/Container.ods differ diff --git a/doc/oplist.odp b/doc/oplist.odp new file mode 100644 index 00000000..77bf1db6 Binary files /dev/null and b/doc/oplist.odp differ diff --git a/doc/oplist.png b/doc/oplist.png new file mode 100644 index 00000000..3f389f19 Binary files /dev/null and b/doc/oplist.png differ