summaryrefslogtreecommitdiff
path: root/include/extensible.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/extensible.h')
-rw-r--r--include/extensible.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/extensible.h b/include/extensible.h
index a2c104377..5ac4fa9da 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -121,11 +121,20 @@ class CoreExport Extensible : public classbase
class CoreExport ExtensionManager
{
- std::map<std::string, reference<ExtensionItem> > types;
public:
+ typedef std::map<std::string, reference<ExtensionItem> > ExtMap;
+
bool Register(ExtensionItem* item);
void BeginUnregister(Module* module, std::vector<reference<ExtensionItem> >& list);
ExtensionItem* GetItem(const std::string& name);
+
+ /** Get all registered extensions keyed by their names
+ * @return Const map of ExtensionItem pointers keyed by their names
+ */
+ const ExtMap& GetExts() const { return types; }
+
+ private:
+ ExtMap types;
};
/** Base class for items that are NOT synchronized between servers */
@@ -192,6 +201,7 @@ class CoreExport LocalStringExt : public SimpleExtItem<std::string>
LocalStringExt(const std::string& key, ExtensibleType exttype, Module* owner);
virtual ~LocalStringExt();
std::string serialize(SerializeFormat format, const Extensible* container, void* item) const;
+ void unserialize(SerializeFormat format, Extensible* container, const std::string& value);
};
class CoreExport LocalIntExt : public LocalExtItem
@@ -200,6 +210,7 @@ class CoreExport LocalIntExt : public LocalExtItem
LocalIntExt(const std::string& key, ExtensibleType exttype, Module* owner);
virtual ~LocalIntExt();
std::string serialize(SerializeFormat format, const Extensible* container, void* item) const;
+ void unserialize(SerializeFormat format, Extensible* container, const std::string& value);
intptr_t get(const Extensible* container) const;
intptr_t set(Extensible* container, intptr_t value);
void unset(Extensible* container) { set(container, 0); }