diff options
author | randomdan <randomdan@localhost> | 2011-12-08 16:46:11 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-12-08 16:46:11 +0000 |
commit | c9990b16272d9c9a55f1f7be1fdef5b625ad27aa (patch) | |
tree | 15b804e78d42233d736351569ec893280d1d7a5f /project2/sql | |
parent | Send the expiry time to CouchDB when deleting old sessions (it's time seems o... (diff) | |
download | project2-c9990b16272d9c9a55f1f7be1fdef5b625ad27aa.tar.bz2 project2-c9990b16272d9c9a55f1f7be1fdef5b625ad27aa.tar.xz project2-c9990b16272d9c9a55f1f7be1fdef5b625ad27aa.zip |
Drop Boost::program_options in favour of our own, pluggable system which integrates application platforms properly
Diffstat (limited to 'project2/sql')
-rw-r--r-- | project2/sql/pch.hpp | 2 | ||||
-rw-r--r-- | project2/sql/sqlCache.cpp | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/project2/sql/pch.hpp b/project2/sql/pch.hpp index f009f1c..a212245 100644 --- a/project2/sql/pch.hpp +++ b/project2/sql/pch.hpp @@ -23,7 +23,7 @@ #include "xmlObjectLoader.h" #include <boost/bind.hpp> #include <boost/foreach.hpp> -#include <boost/program_options.hpp> +#include "options.h" #include <buffer.h> #include <column.h> #include <errno.h> diff --git a/project2/sql/sqlCache.cpp b/project2/sql/sqlCache.cpp index 5435dc4..d1ae930 100644 --- a/project2/sql/sqlCache.cpp +++ b/project2/sql/sqlCache.cpp @@ -13,7 +13,7 @@ #include "iHaveParameters.h" #include "rowSet.h" #include <boost/foreach.hpp> -#include <boost/program_options.hpp> +#include "options.h" #include <boost/algorithm/string/predicate.hpp> typedef boost::shared_ptr<DB::SelectCommand> SelectPtr; @@ -257,23 +257,22 @@ std::string SqlCache::DataSource; std::string SqlCache::HeaderTable; time_t SqlCache::CacheLife; -namespace po = boost::program_options; class CustomSqlCacheLoader : public ElementLoaderImpl<SqlCache> { public: CustomSqlCacheLoader() : opts("SQL Cache options") { - opts.add_options() - ("cache.sql.datasource", po::value(&SqlCache::DataSource), + opts + ("cache.sql.dataSource", Options::value(&SqlCache::DataSource), "The default datasource to connect to") - ("cache.sql.headertable", po::value(&SqlCache::HeaderTable)->default_value("p2cache"), + ("cache.sql.headerTable", Options::value(&SqlCache::HeaderTable, "p2cache"), "The filename to store the data in") - ("cache.sql.life", po::value(&SqlCache::CacheLife)->default_value(3600), + ("cache.sql.life", Options::value(&SqlCache::CacheLife, 3600), "The age of cache entries after which they are removed (seconds)") ; } - po::options_description * options() + const Options * options() const { return &opts; } @@ -293,7 +292,7 @@ class CustomSqlCacheLoader : public ElementLoaderImpl<SqlCache> { } private: - po::options_description opts; + Options opts; }; DECLARE_CUSTOM_LOADER("sqlcache", CustomSqlCacheLoader); |