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

Enable using C++ namespaces and fully specified MATLAB class name for the Proxy #20

Closed
sreeharihegden opened this issue Jan 19, 2023 · 0 comments · Fixed by #21
Closed
Assignees
Labels
enhancement New feature or request

Comments

@sreeharihegden
Copy link
Member

Currently, the registerProxy macro in the Factory.h assumes that the classname from C++ and MATLAB is the same. We should also consider the scenario where this can be different.

One way to resolve this would be by updating the macro to also accept an optional second argument so that the first argument is the MATLAB packaged class name and the second argument is the C++ class name. Something like this:
#define registerProxy(matlabClassName, proxyClassName) if (class_name.compare(#matlabClassName) == 0) return std::make_shared<proxyClassName>(constructor_arguments)

With this, we might also no longer need the extractAfter(classNameWithPackage... call in MATLAB code for Proxy.m.

@sreeharihegden sreeharihegden added the enhancement New feature or request label Jan 19, 2023
@jhughes-mw jhughes-mw mentioned this issue Jan 19, 2023
Merged
sreeharihegden added a commit to mathworks/arrow that referenced this issue Jan 20, 2023
Also, update the register proxy macro used to reflect the libmexclass changes for mathworks/libmexclass#20.
Co-authored-by: Fiona la <fionala7@gmail.com>
sreeharihegden added a commit to mathworks/arrow that referenced this issue Mar 9, 2023
Also, update the register proxy macro used to reflect the libmexclass changes for mathworks/libmexclass#20.
Co-authored-by: Fiona la <fionala7@gmail.com>
sreeharihegden added a commit to mathworks/arrow that referenced this issue Mar 9, 2023
Also, update the register proxy macro used to reflect the libmexclass changes for mathworks/libmexclass#20.
Co-authored-by: Fiona la <fionala7@gmail.com>
sreeharihegden added a commit to mathworks/arrow that referenced this issue Mar 9, 2023
Also, update the register proxy macro used to reflect the libmexclass changes for mathworks/libmexclass#20.
Co-authored-by: Fiona la <fionala7@gmail.com>
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

Successfully merging a pull request may close this issue.

2 participants