00001 #ifndef BASICNAMESPACE_H_ 00002 #define BASICNAMESPACE_H_ 00003 00004 #include "NameObserver.h" 00005 #include <map> 00006 #include "namespace.h" 00007 00008 class BasicNamespace: public Namespace 00009 { 00010 typedef std::map<NameCallback, NameObserver> Names; 00011 Names m_names; 00012 UniqueNames m_uniqueNames; 00013 public: 00014 ~BasicNamespace (void); 00015 void mergeNames (const BasicNamespace& other) const; 00016 void attach (const NameCallback& setName, const NameCallbackCallback& attachObserver); 00017 void detach (const NameCallback& setName, const NameCallbackCallback& detachObserver); 00018 void makeUnique (const std::string& name, const NameCallback& setName) const; 00019 }; 00020 extern BasicNamespace g_defaultNamespace; 00021 extern BasicNamespace g_cloneNamespace; 00022 #endif /* BASICNAMESPACE_H_ */