summaryrefslogtreecommitdiff
path: root/include/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/base.h')
-rw-r--r--include/base.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/base.h b/include/base.h
index d3cc77e05..ac5fec63f 100644
--- a/include/base.h
+++ b/include/base.h
@@ -94,7 +94,20 @@ public:
*
* @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);
+ template<typename T> bool GetExt(const std::string &key, T* &p)
+ {
+ ExtensibleStore::iterator iter = this->Extension_Items.find(key);
+ if(iter != this->Extension_Items.end())
+ {
+ p = (T*)iter->second;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //char* GetExt(const std::string &key);
/** Get a list of all extension items names.
*