Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
None
-
None
Description
Currently there is no way to expose to python a functions of sub / helper(object private) classes as if they were their own.
We use many such structs / classes to 'group' variables / functions in order to help manage things (some are thread safe, some are not, etc)
for now the only way that i know of is to create a wrapper function manually in the c code (but that would ruin our code structure and mislead)
code example:
class NBrokerAccountShared { private: friend class NBrokerAccount; NBrokerAccountShared(){} public: void otherFunc(){} } class NBrokerAccount{ public: NBrokerAccount() : mSharedData(new NBrokerAccountShared() {} void someFunction(){} private: std::unique_ptr<NBrokerAccountShared> mSharedData; }
xml:
<object-type name="NBrokerAccount"> </object-type>
i would like to have 'someFunction' and 'otherFunc' as if they were part of 'NBrokerAccount' while 'NBrokerAccountShared' should stay invisible to the python (generate=false)
i dont know whats the best way to achieve this
via add-function tags with some 'getter' param(NBrokerAccountShared::mSharedData)?