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

Meta examples: add functionality for special translations of certain method calls #4181

Merged
merged 1 commit into from Feb 20, 2018

Conversation

sorig
Copy link
Member

@sorig sorig commented Feb 19, 2018

This allows typed getters like get_real to be translated to get<float64_t> in C++ and get_real in the SWIG interfaces.

Note that typed setters (put) would be more tricky as we'd have to type the keyword arguments

"MethodCall": {
"Default": "$object->$method($arguments)",
"get_real": "$object->get<float64_t>($arguments)"
},
"StaticCall": "C$typeName::$method($arguments)",
"GlobalCall": "$method($arguments)",
Copy link
Member Author

@sorig sorig Feb 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you would need something similar for StaticCall and GlobalCall? Can easily implement but haven't done it for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should suffice for now

@@ -0,0 +1,2 @@
Kernel k = kernel("GaussianKernel")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove this file? it makes the build fail as the method is not implemented.
I will use things in the feature branch

@karlnapf
Copy link
Member

Thanks for the quick response :)

@karlnapf
Copy link
Member

Travis is happy now

@karlnapf karlnapf merged commit ec49300 into shogun-toolbox:develop Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants