Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let wrapAggregate can use specific identifier #269

Open
imzhaodong opened this issue Oct 27, 2020 · 2 comments
Open

let wrapAggregate can use specific identifier #269

imzhaodong opened this issue Oct 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@imzhaodong
Copy link

I'm talking about autowrap based on PyD in this case. And I suggest we enable we can specify identifier name for aggregate being wrapped.

Here is an example. We need to wrap a type which is a template.

template struct S(T)
{
  T value;
}
wrapAggregate(S!A);
wrapAggregate(S!B);

This will end with both instance in Python has same python name which is "S" and cause confliction.

I have checked the PyD implementation. PyD function wrap_class can take optional parameter PyName!"FooBar". Maybe we can dispose this to autowrap as well using optional parameters?

@atilaneves
Copy link
Collaborator

The way to go would probably be using a UDA. Otherwise, manually wrapping with pyd is a workaround.

@atilaneves atilaneves added the enhancement New feature or request label Oct 27, 2020
@imzhaodong
Copy link
Author

Understand.

I currently manually wrapped a few class using PyD as workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants