|
From: Adriano d. S. F. <adr...@gm...> - 2011-04-11 22:09:53
|
All,
Usage of namespaces in our code is very ugly, as we divide things in
main-level namespaces.
In headers, we have lot of "Firebird::". They're specially ugly in this
type of usage:
Firebird::Pair<Firebird::Full<Firebird::string, Firebird::MetaName> > >
With make almost "obligatory" to create extra typedefs.
I suggest we fix namespace usages in an incremental manner. How?
We put in firebird.h this:
-------------------
namespace Jrd
{
}
namespace Firebird
{
namespace Engine
{
using namespace Jrd;
}
}
-------------------
Then we define (or change as we edit files) Jrd modules to use this
namespace:
-------------------
namespace Firebird
{
namespace Engine
{
class EngineClass
{
CommonClass x2;
};
}
}
-------------------
This way subsystems are children of Firebird namespace and don't require
"Firebird::" everywhere. We also avoid "using namespace Firebird" in
implementation files.
Code placed in firebird.h makes Firebird::Engine and Jrd as compatible.
(I showed what to do to Jrd, but the same idea should be applied to all
subsystems)
Adriano
|