Andre Poenitz wrote:
> I still don't understand why you don't use a namespace.

> in the .h:
> namespace lyxglobal {
>          void exec(int argc, char * argv[]);
>          LyX & ref();
>          LyX const & cref();
> }

Maybe nest the namespace
namespace lyx {
namespace global {
        void exec(int argc, char * argv[]);
        LyX & ref();
        LyX const & cref();
} // namespace global
} // namespace lyx

I'd still have to define a LyX class in the .h file, (so that the 
rest of the code can access the LyX member functions) and make exec() 
a friend function so that it can access the (private) LyX constructor.

But yes, this is possible. Note that the LyX class interface is 
currently bloated with a whole heap of private member functions that 
should really belong in an anonymous namespace in the .C file.

So, let's just call this an iterative procedure. Lars' baby-crawl as 
opposed to André's giant-steps?

After all, I was interested primarily in removing the BufferView 
cache... 

Now that it is gone, you might like to consider replacing all of 
mathed's calls to 
        void BufferView::updateInset(InsetOld const *);
with the equivalent call through LyX:
        LyX::cref().updateInset(this);
Which will 'just work' when we eventually have multiple BufferViews.

-- 
Angus

Reply via email to