kode icon indicating copy to clipboard operation
kode copied to clipboard

[kxml_compiler]Pointer based accessor code generation

Open martonmiklos opened this issue 6 years ago • 1 comments

Hi @cornelius, @dfaure

Recently I needed to create a tool (with Qt) which parses an XML, modify a few thing and write it back to file. If I use the current kxml_compiler generated code I need to copy the whole parsed structure to do these modifications.

I was thinking about extending the kxml_compiler to add an option which would allow to generate classes having pointer based accessors.

What do you think about this approach?

martonmiklos avatar Dec 03 '18 22:12 martonmiklos

That's interesting. But pointers always open up the question about creation and ownership... Maybe unique_ptr would help (shared_ptr sounds like overkill).

dfaure-kdab avatar Dec 07 '18 15:12 dfaure-kdab