summaryrefslogtreecommitdiff
path: root/project2/cgi
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-09-15 12:43:27 +0000
committerrandomdan <randomdan@localhost>2013-09-15 12:43:27 +0000
commitd022256a4136234d742e3178d31948b5f88bc0f6 (patch)
tree34182eca80cc6a92a7a4a4c9d19836f0da2e0981 /project2/cgi
parentAdd a module for preloading libraries, which supersedes that in daemon (diff)
downloadproject2-d022256a4136234d742e3178d31948b5f88bc0f6.tar.bz2
project2-d022256a4136234d742e3178d31948b5f88bc0f6.tar.xz
project2-d022256a4136234d742e3178d31948b5f88bc0f6.zip
Allow instance registration to occur with different key types
Diffstat (limited to 'project2/cgi')
-rw-r--r--project2/cgi/cgiOutputOptions.h2
-rw-r--r--project2/cgi/cgiRouter.h2
-rw-r--r--project2/cgi/testCgi.cpp6
3 files changed, 6 insertions, 4 deletions
diff --git a/project2/cgi/cgiOutputOptions.h b/project2/cgi/cgiOutputOptions.h
index bb214ea..be2c452 100644
--- a/project2/cgi/cgiOutputOptions.h
+++ b/project2/cgi/cgiOutputOptions.h
@@ -32,6 +32,8 @@ typedef boost::intrusive_ptr<OutputOptions> OutputOptionsPtr;
class OutputOptionsLoader : public ComponentLoader {
public:
+ typedef std::string KeyType;
+
OutputOptionsPtr create(ScriptNodePtr e) const;
INITOPTIONS;
};
diff --git a/project2/cgi/cgiRouter.h b/project2/cgi/cgiRouter.h
index 4a88b19..9e9c621 100644
--- a/project2/cgi/cgiRouter.h
+++ b/project2/cgi/cgiRouter.h
@@ -15,7 +15,7 @@ class Router : public IntrusivePtrBase {
virtual void present(const MultiRowSetPresenter * p) const = 0;
};
typedef boost::intrusive_ptr<Router> RouterPtr;
-typedef GenLoader<Router, const std::string &> RouterLoader;
+typedef GenLoader<Router, std::string, const std::string &> RouterLoader;
#endif
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp
index 6648cd3..e842958 100644
--- a/project2/cgi/testCgi.cpp
+++ b/project2/cgi/testCgi.cpp
@@ -15,7 +15,7 @@ class TestInput : public cgicc::CgiInput, public CgiEnvInput {
class TestConfigConsumer : public ConfigConsumer {
public:
void operator()(const Glib::ustring & n, const Glib::ustring & p, const Glib::ustring & v, const Options::CurrentPlatform & cp) const {
- Plugable::onAll<Options>(boost::bind(&Options::consume, _1, n, p, v, cp));
+ InstanceSet<Options>::OnAll(boost::bind(&Options::consume, _1, n, p, v, cp));
}
const Options::Option * get(const Glib::ustring &) const {
return NULL;
@@ -26,8 +26,8 @@ class TestInput : public cgicc::CgiInput, public CgiEnvInput {
typedef std::map<std::string, StrPtr> OptStore;
TestInput(int argc, char ** argv)
{
- Plugable::newLoader<OptionsSource, OptionsSource>("_1", new FileOptions(".testCgi.settings"));
- Plugable::newLoader<OptionsSource, OptionsSource>("_2", new CommandLineArguments(argc, argv,
+ OptionsSources::Add("_1", new FileOptions(".testCgi.settings"));
+ OptionsSources::Add("_2", new CommandLineArguments(argc, argv,
[](const char * url) { urls.push_back(url); }));
}