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

Polymorphic helper function #169

Open
ryanenzo opened this issue Mar 15, 2019 · 1 comment
Open

Polymorphic helper function #169

ryanenzo opened this issue Mar 15, 2019 · 1 comment

Comments

@ryanenzo
Copy link
Contributor

Polymorphic data members have a "{member}_as_kdsoap_value()" function, which lets you get the raw KDSoapValue that was received. If it was actually a derived type, you have to deserialize it yourself.

I propose automatically adding a helper function for each polymorphic data member, that looks like:

template
T dataMemberDeserializedAs() const {
T t;
t.deserialize(dataMember_as_kdsoap_value());
return t;
}

I would have implemented this myself. However, I'm couldn't see how to create template functions using libKODE.

@dfaure-kdab
Copy link
Member

libkode can be extended ;-)

BTW libkode upstream is https://github.com/cornelius/kode but unfortunately there are a number of commits on each side that didn't get merged into the other, so they have diverged quite a bit over time.

If you don't want to get into that, let's say I take care of syncing the two libkodes, and you can implement this in kdsoap's copy (without being blocked by the syncing).

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

No branches or pull requests

2 participants