--- a
+++ b/trunk/Cm/Cm.Core/Namespace.hpp
@@ -0,0 +1,41 @@
+#ifndef CM_CORE_NAMESPACE_INCLUDED
+#define CM_CORE_NAMESPACE_INCLUDED
+#include <Cm.Core/Entity.hpp>
+
+namespace Cm { namespace Core {
+
+class Namespace: public Entity
+{
+public:
+    Namespace(const String& name_, const Position& pos_, const ScopePtr& parentScope_);
+    const ScopePtr& Scope() const { return scope; }
+    virtual String FullName() const;
+    virtual void TypeCheck();
+private:
+    ScopePtr scope;
+};
+
+typedef boost::shared_ptr<Namespace> NamespacePtr;
+
+class GlobalNamespace;
+typedef boost::shared_ptr<GlobalNamespace> GlobalNamespacePtr;
+
+class GlobalNamespace: public Namespace
+{
+public:
+    static void Init();
+    static void Done();
+    static GlobalNamespacePtr Instance();
+private:
+    GlobalNamespace();
+    static GlobalNamespacePtr instance;
+};
+
+ScopePtr GlobalScope();
+
+void NamespaceInit();
+void NamespaceDone();
+
+} } // namespoace Cm::Core
+
+#endif // CM_CORE_NAMESPACE_INCLUDED