00001 #ifndef __ATTRIBUTES_H__
00002 #define __ATTRIBUTES_H__
00003
00004 #include <magic/mobject.h>
00005 #include <magic/mstring.h>
00006
00007
00008 template<class K, class V> class Map;
00009
00010
00013 class Attributed {
00014 public:
00015 Attributed ();
00016 ~Attributed ();
00017
00022 void setAttribute (const String& key, Object* value);
00023
00026 const Object& getAttribute (const String& key) const;
00027
00030 Object& getAttribute (const String& key);
00031
00034 const Object* getAttributep (const String& key) const;
00035
00036 private:
00037 Attributed (const Attributed& orig) {FORBIDDEN}
00038 void operator= (const Attributed& orig) {FORBIDDEN}
00039
00040 Map<String,Object>* mAttributes;
00041 };
00042
00043 #endif