Abdelrazak Younes <[EMAIL PROTECTED]> writes:
| Lars Gullik Bjønnes wrote:
| > Abdelrazak Younes <[EMAIL PROTECTED]> writes:
| > | Andre Poenitz wrote:
| > | > On Wed, Sep 27, 2006 at 12:02:30PM +0200, Abdelrazak Younes wrote:
| > | >>> (btw. the bufferlist patch is ok, but we should consolidate
| > | >>> Application and LyX)
| > | >> Yes and my objective is just this indeed. We all agree (I think)
| > | >> that the frontend should use the kernel and not the other way
| > | >> around. I plan to:
| > | >>
| > | >> 1) transfer the remaining bits of lyx_gui to Application and
GuiApplication.
| > | >> 2) transfer bits by bits the lyx_main code to either Application or
| > | >> some helper methods.
| > | > Fine with me.
| > | > But keep in mind that to reach real encapsulation in the end _in
| > | > theory_
| > | > src/*.[Ch] should not contain any #include "frontends/*".
| > | | Yes, that exactly my plan. But hey I have to start somewhere ;-)
| > | | For now, I am just replacing all the global variables with one
| > unique
| > | global variable.
| > But what is gained by that really?
|
| IMO, it is much cleaner this way. I really dislike these global
| variable. But the bigger benefit (for me) is that I will know exactly
| what needs more cleanups in the kernel (src/*).
You would have got the same if you just cleaned up the use of extern
and location of the globals. It is not your regular global variable
anyway, it is an unchaning instance of the _one_ object of that kind
in the whole application.
| > We now get a class (and header
| > file) that will have to include a multitude of other header files. and
| > in cases headerfiles that callers does not need at all.
|
| Right, initially I didn't want to put these additional headers and use
| forward declaration but scoped_ptr requires them (MSVC gives errors).
| We have three solutions here:
Hmm... does MSVC have problems there as well...
| 1) use good old C pointers and manage creation/deletion.
| 1) use good old C pointers in Application.h and static scoped_ptr in
| Application.C creation/deletion.
| 3) pimpl LyXServer, LyXServerSocket and BufferList.
|
| Which one do you prefer?
What do you mean by 3)?
I hope you mean pimpl Application.
--
Lgb