|
1 | | -- mehr klassen wrappen |
| 1 | +Autowrap TODO |
| 2 | +============= |
2 | 3 |
|
3 | | -- attribut zugriff ! ( ->ProteinIdentification::ProteinGroup z.b.) |
| 4 | +- Internal code generator refactor |
4 | 5 |
|
5 | | -- wrap-attach auch für klassen ! |
| 6 | + Consider splitting `CodeGenerator` into smaller, focused classes |
| 7 | + (e.g. for class generation, iterator support, reference handling) |
| 8 | + to improve maintainability and make future extensions easier. |
6 | 9 |
|
7 | | -- codegen refak: |
8 | | - extra klasse fürs eigentliche codegen. |
9 | | - ziel: via vererbung auch iteratoren udn ref-zugriffen wrappen |
| 10 | +- Improved iterator support |
10 | 11 |
|
11 | | -- iteratoren und referenzen (siehe ungen) |
| 12 | + Support parameterized iterator ranges (e.g. methods like |
| 13 | + `beginRT(rtmin)` / `endRT(rtmax)` annotated with `wrap-iter-begin` |
| 14 | + / `wrap-iter-end`) and expose them as dedicated Python iterator or |
| 15 | + range methods instead of only supporting parameterless `begin()` / |
| 16 | + `end()`. |
12 | 17 |
|
13 | | -- DPosition(mit numerischen template argument) |
| 18 | +- Reference semantics for methods returning references |
14 | 19 |
|
15 | | -- statische methoden direkt an die klassen hängen, bevor "wrap-inherits" |
16 | | - aufgelöst wird ! |
| 20 | + For methods that return references to other wrapped objects, explore |
| 21 | + using holder / proxy objects (using the existing |
| 22 | + `AutowrapRefHolder` / `AutowrapPtrHolder` infrastructure) to model |
| 23 | + true reference semantics, rather than always copying values into new |
| 24 | + wrapper instances. The goals are: |
17 | 25 |
|
18 | | -- config extra cimport statments |
| 26 | + - Preserve the lifetime of the referred-to object safely. |
| 27 | + - Allow attribute/method access on the referenced object to affect |
| 28 | + the original C++ object where appropriate. |
19 | 29 |
|
20 | | -- begin(), end() mit param, eg |
21 | | - beginRT(rtmin) # wrap-iter-begin rtrange |
22 | | - endRT(rtmax) # wrap-iter-end rtrange |
| 30 | +- Safe wrapping of non-const iterators |
23 | 31 |
|
24 | | - -> methode rtrange(rtmin, rtmax) |
25 | | - |
26 | | -- neu: ClassGenerator (zum code erzeugen), |
27 | | - RefProxyClassGenerator, IterProxyClassGenerator |
28 | | - |
29 | | -ideen: |
30 | | - |
31 | | - 1) wenn methode M von X eine Ref auf Y zurückgibt: |
32 | | - |
33 | | - idee: reference holder objekt als pointer sollte mit cython |
34 | | - (cython schiebt variable dekl im c++ code nach vorne, z.b |
35 | | - T & x; |
36 | | - was so nicht geht, da referenz ja initalisierte werdne muss |
37 | | - statt desen: |
38 | | - holder[T] * X; |
39 | | - |
40 | | - und später: |
41 | | - |
42 | | - X.setReference(wrapped.inst.method_which_returns_ref(..)) |
43 | | - |
44 | | - als holder im wrappeb object. |
45 | | - original objekt als shared_ptr mitspeichern damit die gespeicherte |
46 | | - refernz (hoffentlich) erhalten bleibt. |
47 | | - |
48 | | - ----------- |
49 | | - |
50 | | - - alle wrapped objekte haben shared_ptr |
51 | | - - methode M returns Proxy mit shared_ptr to X und name von M |
52 | | - - proxy wrapped methoden von R durch impliziten aufruf der methode M |
53 | | - |
54 | | - der einfach heit halber: proxy objekt hat keine methoden die |
55 | | - referenzen auf zu wrappende objekte zurückliefern |
56 | | - ansonsten: --- chaining !? |
57 | | - |
58 | | - |
59 | | - 2) sicheres wrappen von non const iteratoren: |
60 | | - |
61 | | - - iterobject speichert shared_ptr auf das orignal objekt |
62 | | - |
63 | | - - iterobject speicher iterator selbst, damit kann man |
64 | | - methoden des referenzierten objekts deim iterobjekt anhängen |
65 | | - und so bleiben inplace modifiationen erhalten |
| 32 | + Investigate iterator wrappers that store both a reference to the |
| 33 | + original container and the iterator state, so that in-place |
| 34 | + modifications through iterator access are reflected in the |
| 35 | + underlying C++ container (instead of always iterating over copies). |
66 | 36 |
|
0 commit comments