- /** Private data store
- */
- ExtensibleStore Extension_Items;
-
-public:
-
- /** Extend an Extensible class.
- *
- * @param key The key parameter is an arbitary string which identifies the extension data
- * @param p This parameter is a pointer to any data you wish to associate with the object
- *
- * You must provide a key to store the data as, and a void* to the data (typedef VoidPointer)
- * The data will be inserted into the map. If the data already exists, you may not insert it
- * twice, Extensible::Extend will return false in this case.
- *
- * @return Returns true on success, false if otherwise
- */
- template<typename T> bool Extend(const std::string &key, T* p)
- {
- /* This will only add an item if it doesnt already exist,
- * the return value is a std::pair of an iterator to the
- * element, and a bool saying if it was actually inserted.
- */
- return this->Extension_Items.insert(std::make_pair(key, (char*)p)).second;
- }
-
- /** Shrink an Extensible class.
- *
- * @param key The key parameter is an arbitary string which identifies the extension data
- *
- * You must provide a key name. The given key name will be removed from the classes data. If
- * you provide a nonexistent key (case is important) then the function will return false.
- *
- * @return Returns true on success.
- */
- bool Shrink(const std::string &key);
-
- /** Get an extension item.
- *
- * @param key The key parameter is an arbitary string which identifies the extension data
- *
- * @return If you provide a non-existent key name, the function returns NULL, otherwise a pointer to the item referenced by the key is returned.
- */
- char* GetExt(const std::string &key);
+ public:
+ interfacebase() {}
+ static inline void* operator new(size_t, void* m) { return m; }
+ private:
+ interfacebase(const interfacebase&);
+ void operator=(const interfacebase&);
+ static void* operator new(size_t);
+ static void operator delete(void*);
+};