Re: AbiSource, Ispell, Aspell, take 2


Subject: Re: AbiSource, Ispell, Aspell, take 2
From: Kevin Atkinson (kevinatk@home.com)
Date: Mon Mar 06 2000 - 08:05:10 CST


Thomas Fletcher wrote:
>
> On Sun, 5 Mar 2000, Kevin Atkinson wrote:
>
> > Here is a better description of my proposed library with sudo examples.
> >
> > Please give lots of feedback thanks.
> >
>
> [Sections 1-2 snipped]
>
> > 3 Usage
> >
> > When your application first starts you should get a new configuration
> > class with the command:
> >
> > PspellConfig * spell_config = new_pspell_config();
> >
> > which will create a new PspellConfig class. It is allocated with new
> > and it is your responsibility to delete it with delete (not free).
>
> [More stuff talked about ...]
>
> > Finally, when the document is closed the PspellManager class should be
> > deleted like so.
> >
> > delete spell_checker;
> >
> > Do not use free as it is not allocated with malloc.
>
> May I recommend that since you have a construction function
> (rather than just instantiating the class) that you also
> have a destruction function:
>
> destroy_pspell_config(PspellConfig *spell_config);
>
> This means that people won't have to worry about what is
> going on underneath (ie malloc vs new, delete vs free) and
> it makes the API more symetric.
>
I think I will. It will also be needed for the extern "C" API I plan on
developing so that the gnome/gtk folks can use my library also. Also it
is FAR easier to wrap create other language binding from C code than it
is from C++ code.

-- 
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/



This archive was generated by hypermail 2b25 : Mon Mar 06 2000 - 08:02:02 CST