added another simple method
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5696 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8e7b9d749c
commit
c856fbdde1
1 changed files with 6 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ RefCount(B);
|
|||
|
||||
%include "refcount.h"
|
||||
|
||||
%newobject B::create();
|
||||
%newobject B::create(A* a);
|
||||
%newobject B::cloner();
|
||||
|
||||
%inline %{
|
||||
|
|
@ -77,6 +77,11 @@ RefCount(B);
|
|||
{
|
||||
B(A* a) : _a(a) {}
|
||||
|
||||
A* get_a()
|
||||
{
|
||||
return _a;
|
||||
}
|
||||
|
||||
static B* create(A* a)
|
||||
{
|
||||
return new B(a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue