Quantcast

Non-constructable types

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Non-constructable types

Jeremy Cowles
I'm trying to wrap a type that is not constructible, thus the following fails:

SWIGEXPORT void * SWIGSTDCALL CSharp_pxr_UsdPrim_GetVariantSets(void * jarg1) {
  void * jresult ;
  UsdPrim *arg1 = (UsdPrim *) 0 ;
  UsdVariantSets result;
  
  arg1 = (UsdPrim *)jarg1; 
  result = ((UsdPrim const *)arg1)->GetVariantSets();
  jresult = new UsdVariantSets((const UsdVariantSets &)result); 
  return jresult;
}


"no appropriate default constructor available"

I've tried adding %feature("valuewrapper") UsdVariantSets; before the class declaration, but it did not fix the issue.

Any thoughts?

--
Jeremy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-constructable types

Jeremy Cowles
I figured it out!

I was using #include instead of %include on some files, surprising I didn't get more errors...

--
Jeremy


On Wed, May 3, 2017 at 2:26 PM, Jeremy Cowles <[hidden email]> wrote:
I'm trying to wrap a type that is not constructible, thus the following fails:

SWIGEXPORT void * SWIGSTDCALL CSharp_pxr_UsdPrim_GetVariantSets(void * jarg1) {
  void * jresult ;
  UsdPrim *arg1 = (UsdPrim *) 0 ;
  UsdVariantSets result;
  
  arg1 = (UsdPrim *)jarg1; 
  result = ((UsdPrim const *)arg1)->GetVariantSets();
  jresult = new UsdVariantSets((const UsdVariantSets &)result); 
  return jresult;
}


"no appropriate default constructor available"

I've tried adding %feature("valuewrapper") UsdVariantSets; before the class declaration, but it did not fix the issue.

Any thoughts?

--
Jeremy


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...