Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pwalig committed Feb 5, 2025
1 parent d4a18e0 commit 29cd213
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ with methods like `release()` and `get()` and overloaded `->` and `*` operators
## 2. Customizable:
with `#define`s you can include / exclude methods, operators and constructors from `oop_ptr` definition
## 3. Simple and understandable:
easy to analyze source code
# Documentation
``` c++
Expand Down Expand Up @@ -165,13 +168,13 @@ In following definitions replace `b` with name of the base class and `c` with na
| `OOP_PTR_PTR_MOVE_OPERATOR` | `operator=(T* ptr)` | no |

> [!WARNING]
> Do not define both: `OOP_PTR_PTR_COPY_OPERATOR` and `OOP_PTR_PTR_MOVE_OPERATOR` at once.
> Do not define both: `OOP_PTR_PTR_COPY_OPERATOR` and `OOP_PTR_PTR_MOVE_OPERATOR` at once.
> Do not define both: `OOP_PTR_PTR_COPY_CONSTRUCTOR` and `OOP_PTR_PTR_MOVE_CONSTRUCTOR` at once.

It is also possible to change name of the method generated by macros with `oop_ptr_get_copy` `#define`.

``` c++
#define oop_ptr_get_copy awesomeNamedMethod
#define oop_ptr_get_copy awesomelyNamedMethod
```
By default (if `oop_ptr_get_copy` is not defined) macros will generate method named: `get_copy_ptr`
Expand Down

0 comments on commit 29cd213

Please sign in to comment.