Wartbed:Manual/Conventions

From Dark Omen Wiki

< Wartbed:Manual
Revision as of 17:08, 27 February 2010 by Mikademus (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Everything related to the WARTBED system itself is located under the wb namespace. In turn, every major component is represented by a class with its name, and a namespace under wb with the same name in lower case. The major class itself is always located outside the namespace of corresponding name.

namespace wb
{
    class Camera
    {
        ...
    };
 
    namespace camera
    {
        // support classes etc
    }
}

This naming convention is repeated throughout WARTBED: for instance in input/InputSystem, theatre/Theatre, gui/GUI etc.

Applications, games and modules using WARTBED generally are not placed under the wb namespace. For instance, the Dark Omen map viewer is located under its own darkomen namespace:

namespace darkomen
{
    using namespace wb;
 
    class MapViewer
    {
        ...
    };
}
Personal tools
communication