Hi Slava,

>> I've pushed some more fixes to [email protected]:jedahu/factor.git inlinec
>> branch.
>
> Pulled. FWIW, the public repository URL is git://github.com/jedahu/factor.git.

Oops. Mindlessly copied the wrong URL.

>> alien.marshall defines an alien-wrapper tuple and the unmarshalling code
>> wraps non-primitive pointers in an instance of this type. A dynamic-cast
>> method is supplied for cases like Qt, where a) the returned object may
>> be a subclass of the declared return type, and b) it is possible to
>> determine at runtime what the subclass is, and cast to it.
>
> This sounds like a useful abstraction. I've long wanted to make
> C-STRUCT: nicer to use, by having it define a new data type which
> overloads accessors, and wrapping and unwrapping function parameters
> in a manner similar to what you describe. It looks like this could be
> implemented relatively easily using your abstraction, because all the
> required information is retained by the alien library; eg, try "stat"
> c-type . in the listener.

Nice. Hadn't thought about structs; too focused on classes. I'll work
them into the marshalling code.

> With Objective-C, it is even possible to perform introspection at
> runtime to determine the instance variables of a class, and a Factor
> struct could be generated from this automatically.

At this stage I'll have to leave the Objective-C up to someone else. C++
is my priority. I'm now writing TEMPLATE: and TEMPLATE-INSTANCE: and
related words for creation of and dispatch on methods of template
classes.

Hopefully this will all congeal into one glorious whole with smoke and
Qt bindings on top :-)

Jeremy

------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to