help-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-serveez] How does the config language stuff work?


From: stefan
Subject: Re: [help-serveez] How does the config language stuff work?
Date: Fri, 15 Nov 2002 18:34:59 +0100 (CET)

On 15 Nov 2002, Andreas Rottmann wrote:

> [nice explanation snipped]
>
> > i am not sure if you can easily re-use the function since it is used for
> > server configuration structs only. perhaps you can re-use the idea and
> > some code-snippets to implement a generic guile-struct <-> c-struct
> > converter with good error messages.
> >
> > if you want to do this, i suggest to
> > 1) define the data types you want to have available in C
> >    (Strings, various Integers, other numbers, arrays of values, maps,
> >     whatever)
> > 2) define how this stuff has to look like in guile.
> > 3) define how the C part has to tell your mapper what it wants
> > 4) implement the mapper
> > 5) dont forget the error messages (yes, i am obsessed with those)
> >
> Hmm, I guess such a thing would be nice to have. But I think something
> similiar might already exist - there is guile-gobject (for the GLib
> object system), which probably does this & more. I will try to go this
> way, implementing my services as objects derived from GObject. When I
> have the stuff running in C, I'll look into guile-gobject.
>
> Looking into GObject (and guile-gobject) might be an idea for serveez,
> too: It seems quite easy to implement dynamically loadable types with
> it, which could be used to simplify serveez's server loading
> code.

Of course there are some more possibilities to achieve these things.  SWIG
is another one.  This tool creates you automatically setter/getter methods
(runnable from guile) for real C structs.  Possibly this is what you
want...

Cheers,
        address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]