-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature Request: Conversion of library types #10
Comments
I'm not a 100% sure what you're trying to achieve here. Does |
I would like to be able to do the following group("foo")
.define("bar", [](std::string text){ something_internal(text); })
.define("barz", []() { return internal_string(); }); and use It would also be nice if there is a way to register converters from scheme lists, vectors, etc. to cpp containers. group("foo2")
.define("bar", [](std::vector<int> vec){ something_internal(vec); })
.define("barz", []() { return internal_int_vector(); }); If I can achieve that with scm::type it would be nice if you could give me a hint how. |
Not sure if this is exactly what you are looking for, but you can check the examples here where I use the library to create an efficient immtuable vector: https://github.com/arximboldi/immer/blob/master/extra/guile/src/immer.cpp |
Hi,
I have hit the point where I need to pass more complex types through my scheme bindings.
The primitives as currently supported by schmutz through
to_cpp
andfrom_cpp
are no longer enough.I have patched my version to support some types I need, but that's hardly sustainable.
I can see how support of std types could be provided by schmutz itself, like many other binding libraries for other script languages do.
But I am using schmutz together with third party libraries, in particular QT.
Is there a concept how to add conversion functions as a user of schmutz?
I haven't understood the internals enough to develop it from scratch myself.
If you can provide a design outline, I'm happy to implement it.
It could be complicated by the fact, that some libraries, in particular QT, don't use namespaces properly, which makes an Argument Dependent Lookup based approach difficult.
The text was updated successfully, but these errors were encountered: