Re: A newbie question
German Viscuso <[email protected]>
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <02e201c44a4a$0386fcb0$f700a8c0@parasite> |
Ok excellent, when everything is set up I'll provide an example of connecting breve to Smalltalk and perhaps make a tutorial to document the process. Thanks. GV ----- Original Message ----- From: "jon klein" <[email protected]> To: <[email protected]> Sent: Friday, June 04, 2004 12:20 PM Subject: Re: [breve] A newbie question > > On Jun 1, 2004, at 12:22 AM, German Viscuso wrote: > > > If somehow breve could offer a dll with exported c functions that > > communicate with the breve engine almost any Smalltalk user (and those > > with > > external api access via dlls in other languages) could use and map the > > objects in the simulation thrugh it and build whatever intermediate > > layer > > neccessary. > > > > I'm willing to help in achieving this scheme if you think it's > > possible (I > > know little about breve right know) and if you give me some pointers > > =) I > > have an intermediate level of c and c++ knowledge (I'm mostly an > > Smalltalk > > programmer) but have done many projects that interfaced c dynamic link > > libraries with Smalltalk (including having to build the dlls myself, > > using > > VC++). > > I'm in the process of cleanly separating out the the engine code from > the > steve language code. It's involving a rather major (but well needed) > restructuring of some of the code. When it's finished, there will be a > library and an API that you should be able to use from any language that > can call C functions. > > Even though I haven't put together the API yet, I can give an overview > of > what will be needed: > > - translation between your language's types and the breve stEval > structure > > In steve/stEval.h (and as described in the plugin documentation), > you'll > find the stEval structure. This is the structure used to pass around > arguments and return values by the breve engine. You'll need to > provide > functions to translate to and from the stEval structure from your > native > types. > > - use the API to call breve's "C-style internal functions", using > stEvals > to pass around the data. > > If you look at the source, in the steve directory, you'll find a bunch > of files that begin with the string "steveFuncs". These are the files > which define the internal functions. > > The call to do this might look something like this: > > breveCallInternalFunction(currentInstance, functionName, arguments, > &return); > > - port the steve class files to the native language, using these > internal > functions. > > This should be very straightforward once the rest is in place. > > > For the moment, it might be best to start with the first item, > translation > between native types and the stEval structure. Hopefully I'll have the > code > put back together in the next week or so, so that I'll be able to be > more > specific about how the pieces will come together. > > - jon klein > > _______________________________________________ > breve mailing list > [email protected] > http://www.spiderland.org/mailman/listinfo/breve _______________________________________________ breve mailing list [email protected] http://www.spiderland.org/mailman/listinfo/breve