QxEntityEditor - How to use custom files to extend entity?

Forum for posting problems using QxEntityEditor

QxEntityEditor - How to use custom files to extend entity?

Postby gigigi2002 » Mon Jun 01, 2020 2:31 pm

Hello,
I am using QxEntityEditor to generate C++ code. Along with entities code it is also generating appropriate "custom" CPP and H files for every entity.
Assuming that these custom files can be used to extend functionality of the generated entities, what would be the best practice to do that if I need to add new methods, add another constructor or extend enumeration entity?
An example would be appreciated ;)
Thank you.
gigigi2002
 
Posts: 2
Joined: Mon Jun 01, 2020 1:15 pm

Re: QxEntityEditor - How to use custom files to extend entit

Postby qxorm » Mon Jun 01, 2020 2:46 pm

Hello,

About the custom directory, as explained in the QxEntityEditor manual (https://www.qxorm.com/qxorm_en/manual_q ... parameters) :
These custom files can be used for example to implement validation methods, or trigger functions.


You can also write every functions you want in custom files, but you can't add new methods or another constructor (because of C++ limitation compared to C# which supports partial classes).

So to add new methods / other constructors to an entity, I would recommend to use the QxEntityEditor Javascript engine to customize exports.
A documentation is here : https://www.qxorm.com/qxorm_en/manual_q ... #js_engine
There are sample scripts in QxEntityEditor package.
qxorm
Site Admin
 
Posts: 483
Joined: Mon Apr 12, 2010 7:45 am


Return to QxEntityEditor - Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron