mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
C++ wrapper: add a method on each class in order to get the associated C object pointer
This commit is contained in:
parent
10055ddd96
commit
9aa350c402
2 changed files with 9 additions and 0 deletions
|
|
@ -37,6 +37,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
{{/isfactory}}{{/_class}}
|
||||
|
||||
|
||||
{{#_class}}
|
||||
{{#isNotListener}}
|
||||
struct {{{privCClassName}}};
|
||||
{{/isNotListener}}
|
||||
{{/_class}}
|
||||
|
||||
|
||||
namespace linphone {
|
||||
|
||||
{{#priorDeclarations}}
|
||||
|
|
@ -68,6 +75,7 @@ namespace linphone {
|
|||
LINPHONECXX_PUBLIC ~{{{className}}}();
|
||||
LINPHONECXX_PUBLIC const void *c_struct() const {return mPrivPtr;}
|
||||
{{/isnotrefcountable}}
|
||||
LINPHONECXX_PUBLIC {{{privCClassName}}} *cPtr() {return ({{{privCClassName}}} *)mPrivPtr;}
|
||||
{{/isNotListener}}
|
||||
|
||||
{{#ismonolistenable}}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ class CppTranslator(object):
|
|||
'isVcard' : (_class.name.to_c() == 'LinphoneVcard'),
|
||||
'className' : CppTranslator.translate_class_name(_class.name),
|
||||
'cClassName' : '::' + _class.name.to_c(),
|
||||
'privCClassName' : '_' + _class.name.to_c(),
|
||||
'parentClassName' : 'Object' if _class.refcountable else None,
|
||||
'methods' : [],
|
||||
'staticMethods' : [],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue