Auto-magic smart pointer wrapper drops functions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto-magic smart pointer wrapper drops functions

Jeremy Cowles
I'm using a setup like this:

%typemap(cscode) UsdStageWeakPtr %{
public static implicit operator UsdStageWeakPtr(UsdStageRefPtr d)
{
return new UsdStageWeakPtr(d);
}
%}


class UsdStageRefPtr{
public:
UsdStageRefPtr(UsdStage* stage);
UsdStage const* operator->();
};



class UsdStageWeakPtr{
public:
UsdStageWeakPtr(UsdStage* stage);
explicit UsdStageWeakPtr(UsdStageRefPtr const& stage);
UsdStage const* operator->();
};
typedef UsdStageWeakPtr UsdStagePtr;




// UsdStage defined here:
%include "pxr/usd/usd/stage.h"


And UsdStageRefPtr has a ton of random missing functions, for example this one:

UsdTreeIterator Traverse();

I can't seem to make any rhyme or reason of it.

Could someone explain?

Will this problem go away if I use the Swig boost::smart_ptr pattern instead?

--
Jeremy


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|

Re: Auto-magic smart pointer wrapper drops functions

Jeremy Cowles
In case it wasn't clear, this works:
  UsdStageRefPtr stage = Stage.CreateInMemory();
  stage.__deref__.Traverse();

But this does not, because Traverse is undefined:
  UsdStageRefPtr stage = Stage.CreateInMemory();
  stage.Traverse();

However many other UsdStage functions are correctly defined on UsdStageRefPtr.



On Sun, Nov 6, 2016 at 9:57 AM Jeremy Cowles <[hidden email]> wrote:
I'm using a setup like this:

%typemap(cscode) UsdStageWeakPtr %{
public static implicit operator UsdStageWeakPtr(UsdStageRefPtr d)
{
return new UsdStageWeakPtr(d);
}
%}


class UsdStageRefPtr{
public:
UsdStageRefPtr(UsdStage* stage);
UsdStage const* operator->();
};



class UsdStageWeakPtr{
public:
UsdStageWeakPtr(UsdStage* stage);
explicit UsdStageWeakPtr(UsdStageRefPtr const& stage);
UsdStage const* operator->();
};
typedef UsdStageWeakPtr UsdStagePtr;




// UsdStage defined here:
%include "pxr/usd/usd/stage.h"


And UsdStageRefPtr has a ton of random missing functions, for example this one:

UsdTreeIterator Traverse();

I can't seem to make any rhyme or reason of it.

Could someone explain?

Will this problem go away if I use the Swig boost::smart_ptr pattern instead?

--
Jeremy


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|

Re: Auto-magic smart pointer wrapper drops functions

Jeremy Cowles
No one else has seen anything like this?

On Sun, Nov 6, 2016 at 10:29 AM Jeremy Cowles <[hidden email]> wrote:
In case it wasn't clear, this works:
  UsdStageRefPtr stage = Stage.CreateInMemory();
  stage.__deref__.Traverse();

But this does not, because Traverse is undefined:
  UsdStageRefPtr stage = Stage.CreateInMemory();
  stage.Traverse();

However many other UsdStage functions are correctly defined on UsdStageRefPtr.



On Sun, Nov 6, 2016 at 9:57 AM Jeremy Cowles <[hidden email]> wrote:
I'm using a setup like this:

%typemap(cscode) UsdStageWeakPtr %{
public static implicit operator UsdStageWeakPtr(UsdStageRefPtr d)
{
return new UsdStageWeakPtr(d);
}
%}


class UsdStageRefPtr{
public:
UsdStageRefPtr(UsdStage* stage);
UsdStage const* operator->();
};



class UsdStageWeakPtr{
public:
UsdStageWeakPtr(UsdStage* stage);
explicit UsdStageWeakPtr(UsdStageRefPtr const& stage);
UsdStage const* operator->();
};
typedef UsdStageWeakPtr UsdStagePtr;




// UsdStage defined here:
%include "pxr/usd/usd/stage.h"


And UsdStageRefPtr has a ton of random missing functions, for example this one:

UsdTreeIterator Traverse();

I can't seem to make any rhyme or reason of it.

Could someone explain?

Will this problem go away if I use the Swig boost::smart_ptr pattern instead?

--
Jeremy


------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user