[mythtv] Ticket #4516: Fix broken Win32 build (circular references out of control again).

Nigel Pearson nigel at ind.tansu.com.au
Thu Jan 31 03:42:51 UTC 2008


> When you have time, take a look at http://svn.mythtv.org/trac/ 
> ticket/4546 -
> why not something like this?

Several thoughts:


1) If we go this way, it should probably
be in a C++ style wrapper. e.g.

class MythContext {
...
   public:
...
     static MythContext *get(void);
     CreateMythContext(const QString &binversion);
...
}


2) I like the tidyup of the gContext lines in */main.cpp


3) Having global variables isn't intrinsically evil.
If anything, it makes the code a little bit tidier:
    gContext->blah()
instead of
    GetMythContext()->blah()
or
    MythContext::get()->blah()


4) There are MythContext reorgs planned to
work around the circular deps problem. See

http://svn.mythtv.org/trac/ticket/4264

While that has its own problems, I'm hoping
that long-term, it will be a better solution.
>

--
Nigel Pearson, nigel at ind.tansu.com.au|The weak point of
Telstra Net. Eng., Sydney, Australia | the modern car is
Office: 9202 3900    Fax:  9261 3912 | the squidgy organic
Mobile: 0408 664435  Home: 9792 6998 | bit behind the wheel.


More information about the mythtv-dev mailing list