summaryrefslogtreecommitdiff
path: root/project2/common/variables
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
commitc9382a9c89ce03f1fcde3fadd294a3938b894e47 (patch)
tree7e5de1834f121b44f2485132741a6b3fe8431129 /project2/common/variables
parentCompat fix (diff)
parentBig tidy up of loggers and logger factories (diff)
downloadproject2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.tar.bz2
project2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.tar.xz
project2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.zip
Merge branch 'project2-adhoc-plugins'
Diffstat (limited to 'project2/common/variables')
-rw-r--r--project2/common/variables/config.cpp12
-rw-r--r--project2/common/variables/literal.cpp5
-rw-r--r--project2/common/variables/localparam.cpp2
-rw-r--r--project2/common/variables/lookup.cpp4
-rw-r--r--project2/common/variables/param.cpp2
-rw-r--r--project2/common/variables/session.cpp2
6 files changed, 13 insertions, 14 deletions
diff --git a/project2/common/variables/config.cpp b/project2/common/variables/config.cpp
index e134d07..9ac3dd0 100644
--- a/project2/common/variables/config.cpp
+++ b/project2/common/variables/config.cpp
@@ -32,7 +32,7 @@ class VariableConfig : public VariableImplDyn {
const Glib::ustring name;
};
-class VariableConfigLoader : public VariableLoader::For<VariableConfig> {
+class VariableConfigFactory : public VariableFactory::For<VariableConfig> {
public:
class AppSettings : public Options::Option {
public:
@@ -68,16 +68,16 @@ class VariableConfigLoader : public VariableLoader::For<VariableConfig> {
return "Load settings into the client application";
}
};
- VariableConfigLoader() :
+ VariableConfigFactory() :
opts(new Options("Variables - ModConfig options"))
{
(*opts)(new AppSettings());
- OptionsSets::Add(typeid(AppSettings).name(), opts);
+ AdHoc::PluginManager::getDefault()->add<Options>(opts, typeid(AppSettings).name(), __FILE__, __LINE__);
}
- ~VariableConfigLoader()
+ ~VariableConfigFactory()
{
- OptionsSets::Remove(typeid(AppSettings).name());
+ AdHoc::PluginManager::getDefault()->remove<Options>(typeid(AppSettings).name());
}
const Options * options() const {
@@ -88,5 +88,5 @@ class VariableConfigLoader : public VariableLoader::For<VariableConfig> {
Options * opts;
};
-DECLARE_CUSTOM_COMPONENT_LOADER("config", VariableConfigLoader, VariableConfigLoader, VariableLoader);
+NAMEDPLUGIN("config", VariableConfigFactory, VariableFactory);
diff --git a/project2/common/variables/literal.cpp b/project2/common/variables/literal.cpp
index 529be6e..4f8e029 100644
--- a/project2/common/variables/literal.cpp
+++ b/project2/common/variables/literal.cpp
@@ -72,8 +72,7 @@ VariableLiteral::VarPart::value(ExecContext * ec) const
return (*this)(ec);
}
-DECLARE_COMPONENT_LOADER("literal", VariableLiteral, VariableLoader);
-DECLARE_CUSTOM_COMPONENT_LOADER("", VariableLiteralDef, VariableLoader::For<VariableLiteral>, VariableLoader);
-
+NAMEDFACTORY("literal", VariableLiteral, VariableFactory);
+NAMEDFACTORY("", VariableLiteral, VariableFactory);
diff --git a/project2/common/variables/localparam.cpp b/project2/common/variables/localparam.cpp
index cf2f165..63d6f55 100644
--- a/project2/common/variables/localparam.cpp
+++ b/project2/common/variables/localparam.cpp
@@ -28,5 +28,5 @@ class VariableLocalParam : public VariableImplDyn {
private:
const Glib::ustring name;
};
-DECLARE_COMPONENT_LOADER("local", VariableLocalParam, VariableLoader);
+NAMEDFACTORY("local", VariableLocalParam, VariableFactory);
diff --git a/project2/common/variables/lookup.cpp b/project2/common/variables/lookup.cpp
index 42ddff2..6c6ca55 100644
--- a/project2/common/variables/lookup.cpp
+++ b/project2/common/variables/lookup.cpp
@@ -34,7 +34,7 @@ class VariableLookup : public VariableImplDyn, public RowProcessor {
RowProcessor(e),
name(e->value("name", NULL).as<Glib::ustring>())
{
- e->script->loader.addLoadTarget(e, Storer::into<ElementLoader>(&rowSets));
+ e->script->loader.addLoadTarget(e, Storer::into<RowSetFactory>(&rowSets));
}
VariableType value(ExecContext * ec) const
{
@@ -70,4 +70,4 @@ class VariableLookup : public VariableImplDyn, public RowProcessor {
RowSets rowSets;
const Glib::ustring name;
};
-DECLARE_COMPONENT_LOADER("lookup", VariableLookup, VariableLoader);
+NAMEDFACTORY("lookup", VariableLookup, VariableFactory);
diff --git a/project2/common/variables/param.cpp b/project2/common/variables/param.cpp
index a1ef9b7..8e4125a 100644
--- a/project2/common/variables/param.cpp
+++ b/project2/common/variables/param.cpp
@@ -27,5 +27,5 @@ class VariableParam : public VariableImplDyn {
private:
const VariableType name;
};
-DECLARE_COMPONENT_LOADER("param", VariableParam, VariableLoader);
+NAMEDFACTORY("param", VariableParam, VariableFactory);
diff --git a/project2/common/variables/session.cpp b/project2/common/variables/session.cpp
index ed2077d..d3331c0 100644
--- a/project2/common/variables/session.cpp
+++ b/project2/common/variables/session.cpp
@@ -27,5 +27,5 @@ class VariableSession : public VariableImplDyn {
private:
const Glib::ustring name;
};
-DECLARE_COMPONENT_LOADER("session", VariableSession, VariableLoader);
+NAMEDFACTORY("session", VariableSession, VariableFactory);