From: g0dil Date: Wed, 20 Jan 2010 19:44:26 +0000 (+0000) Subject: Revert bad karmic-fix changes X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=90f51da2398de98c2c217045f791ca7813730f48;p=senf.git Revert bad karmic-fix changes git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1548 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Console/Config.test.cc b/senf/Utils/Console/Config.test.cc index 2058a54..5be47ca 100644 --- a/senf/Utils/Console/Config.test.cc +++ b/senf/Utils/Console/Config.test.cc @@ -27,11 +27,7 @@ //#include "Config.test.ih" // Custom includes -#include "Config.hh" -#include "ScopedDirectory.hh" -#include "ParsedCommand.hh" -#include "ConfigFile.hh" -#include "ProgramOptions.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/ConfigFile.test.cc b/senf/Utils/Console/ConfigFile.test.cc index 3f635a6..adf4f34 100644 --- a/senf/Utils/Console/ConfigFile.test.cc +++ b/senf/Utils/Console/ConfigFile.test.cc @@ -27,10 +27,8 @@ //#include "ConfigFile.test.ih" // Custom includes -#include "ConfigFile.hh" +#include "Console.hh" #include -#include "ScopedDirectory.hh" -#include "ParsedCommand.hh" #include #include diff --git a/senf/Utils/Console/Executor.test.cc b/senf/Utils/Console/Executor.test.cc index 80e2653..0a6a6db 100644 --- a/senf/Utils/Console/Executor.test.cc +++ b/senf/Utils/Console/Executor.test.cc @@ -29,7 +29,7 @@ // Custom includes #include #include -#include "Executor.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Node.test.cc b/senf/Utils/Console/Node.test.cc index 46bf919..f72da5e 100644 --- a/senf/Utils/Console/Node.test.cc +++ b/senf/Utils/Console/Node.test.cc @@ -28,7 +28,7 @@ // Custom includes #include -#include "Node.hh" +#include "Console.hh" #include #include @@ -158,7 +158,7 @@ namespace { BOOST_AUTO_UNIT_TEST(senfConsoleAddNode) { senf::console::root().add("fn1", &callback); - senf::console::root().add("fn2", Functor()); + senf::console::root().add("fn2", boost::function(Functor())); senf::console::ParseCommandInfo info; diff --git a/senf/Utils/Console/OverloadedCommand.test.cc b/senf/Utils/Console/OverloadedCommand.test.cc index bce2c86..892f21e 100644 --- a/senf/Utils/Console/OverloadedCommand.test.cc +++ b/senf/Utils/Console/OverloadedCommand.test.cc @@ -28,7 +28,7 @@ // Custom includes #include -#include "OverloadedCommand.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Parse.test.cc b/senf/Utils/Console/Parse.test.cc index dc9bafb..0f2e150 100644 --- a/senf/Utils/Console/Parse.test.cc +++ b/senf/Utils/Console/Parse.test.cc @@ -31,7 +31,7 @@ // Custom includes #include -#include "Parse.hh" +#include "Console.hh" #include "Parse.ih" #include diff --git a/senf/Utils/Console/ParsedCommand.test.cc b/senf/Utils/Console/ParsedCommand.test.cc index 698c6da..8a4a7bb 100644 --- a/senf/Utils/Console/ParsedCommand.test.cc +++ b/senf/Utils/Console/ParsedCommand.test.cc @@ -29,10 +29,7 @@ // Custom includes #include #include -#include "ParsedCommand.hh" -#include "Executor.hh" -#include "Parse.hh" -#include "ScopedDirectory.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/ProgramOptions.test.cc b/senf/Utils/Console/ProgramOptions.test.cc index d063473..6fdcbc4 100644 --- a/senf/Utils/Console/ProgramOptions.test.cc +++ b/senf/Utils/Console/ProgramOptions.test.cc @@ -27,9 +27,7 @@ //#include "ProgramOptions.test.ih" // Custom includes -#include "ProgramOptions.hh" -#include "ScopedDirectory.hh" -#include "ParsedCommand.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/STLSupport.test.cc b/senf/Utils/Console/STLSupport.test.cc index ddc78dc..37c9af2 100644 --- a/senf/Utils/Console/STLSupport.test.cc +++ b/senf/Utils/Console/STLSupport.test.cc @@ -28,11 +28,7 @@ // Custom includes #include -#include "STLSupport.hh" -#include "ParsedCommand.hh" -#include "Executor.hh" -#include "Parse.hh" -#include "ScopedDirectory.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/ScopedDirectory.cti b/senf/Utils/Console/ScopedDirectory.cti index 69b70fa..f379c4e 100644 --- a/senf/Utils/Console/ScopedDirectory.cti +++ b/senf/Utils/Console/ScopedDirectory.cti @@ -85,7 +85,8 @@ prefix_ senf::console::SimpleCommandNode & senf::console:: senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, void (Owner::*fn)(std::ostream &, ParseCommandInfo const &), int) { - return node.add(name, boost::bind(fn,boost::ref(owner),_1,_2)); + return node.add(name, boost::function( + boost::bind(fn,boost::ref(owner),_1,_2))); } template diff --git a/senf/Utils/Console/ScopedDirectory.test.cc b/senf/Utils/Console/ScopedDirectory.test.cc index f94ebeb..801de49 100644 --- a/senf/Utils/Console/ScopedDirectory.test.cc +++ b/senf/Utils/Console/ScopedDirectory.test.cc @@ -28,7 +28,7 @@ // Custom includes #include -#include "ScopedDirectory.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Server.test.cc b/senf/Utils/Console/Server.test.cc index 45bb758..a8047b9 100644 --- a/senf/Utils/Console/Server.test.cc +++ b/senf/Utils/Console/Server.test.cc @@ -27,7 +27,7 @@ //#include "Server.test.ih" // Custom includes -#include "Server.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Traits.test.cc b/senf/Utils/Console/Traits.test.cc index ae8cd33..a6a1b41 100644 --- a/senf/Utils/Console/Traits.test.cc +++ b/senf/Utils/Console/Traits.test.cc @@ -27,12 +27,7 @@ //#include "Traits.test.ih" // Custom includes -#include "Traits.hh" -#include "Utility.hh" -#include "ParsedCommand.hh" -#include "Executor.hh" -#include "Parse.hh" -#include "ScopedDirectory.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/UDPServer.test.cc b/senf/Utils/Console/UDPServer.test.cc index c4dc8a9..3cd8b2e 100644 --- a/senf/Utils/Console/UDPServer.test.cc +++ b/senf/Utils/Console/UDPServer.test.cc @@ -27,7 +27,7 @@ //#include "UDPServer.test.ih" // Custom includes -#include "UDPServer.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Utility.test.cc b/senf/Utils/Console/Utility.test.cc index 2ec5ab7..b9100df 100644 --- a/senf/Utils/Console/Utility.test.cc +++ b/senf/Utils/Console/Utility.test.cc @@ -27,12 +27,7 @@ //#include "Utility.test.ih" // Custom includes -#include "Utility.hh" -#include "Traits.hh" -#include "ParsedCommand.hh" -#include "Executor.hh" -#include "Parse.hh" -#include "ScopedDirectory.hh" +#include "Console.hh" #include #include diff --git a/senf/Utils/Console/Variables.cti b/senf/Utils/Console/Variables.cti index 1d19fbd..e5a311c 100644 --- a/senf/Utils/Console/Variables.cti +++ b/senf/Utils/Console/Variables.cti @@ -200,7 +200,7 @@ template prefix_ senf::console::ConstVariableAttributor senf::console::detail::VariableNodeCreator::add(DirectoryNode & node, std::string const & name, - Variable const & var) + Variable & var) { typename VariableAttributor::QueryOverload & queryOverload ( node.add(name, typename detail::QueryVariable::Function( @@ -212,8 +212,7 @@ senf::console::detail::VariableNodeCreator::add(DirectoryNode & #ifndef DOXYGEN template -prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console:: +prefix_ senf::console::VariableAttributor senf::console:: senf_console_add_node(DirectoryNode & node, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type *, typename boost::disable_if< boost::is_convertible >::type *, @@ -223,28 +222,15 @@ senf_console_add_node(DirectoryNode & node, std::string const & name, Variable & } template -prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console:: -senf_console_add_node(DirectoryNode & node, std::string const & name, Variable const & var, int, - typename boost::disable_if< boost::is_convertible >::type *, - typename boost::disable_if< boost::is_convertible >::type *, - typename boost::disable_if_c::is_callable>::type *) -{ - return detail::VariableNodeCreator::add(node, name, var); -} - -template prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console:: -senf_console_add_node(DirectoryNode & node, std::string const & name, - boost::reference_wrapper var, int) +senf::console::senf_console_add_node(DirectoryNode & node, std::string const & name, + boost::reference_wrapper var, int) { return detail::VariableNodeCreator::add(node, name, var.get()); } template -prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console:: +prefix_ senf::console::VariableAttributor senf::console:: senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type *, @@ -255,18 +241,6 @@ senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & n } template -prefix_ typename senf::console::detail::VariableNodeCreator::result_type -senf::console:: -senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, - Variable const & var, int, - typename boost::disable_if< boost::is_convertible >::type *, - typename boost::disable_if< boost::is_convertible >::type *, - typename boost::disable_if_c::is_callable>::type *) -{ - return detail::VariableNodeCreator::add(node, name, var); -} - -template prefix_ typename senf::console::detail::VariableNodeCreator::result_type senf::console::senf_console_add_node(DirectoryNode & node, Owner &, std::string const & name, diff --git a/senf/Utils/Console/Variables.hh b/senf/Utils/Console/Variables.hh index 658630b..4f93a93 100644 --- a/senf/Utils/Console/Variables.hh +++ b/senf/Utils/Console/Variables.hh @@ -47,43 +47,25 @@ namespace console { #ifndef DOXYGEN template - typename detail::VariableNodeCreator::result_type - senf_console_add_node( + VariableAttributor senf_console_add_node( DirectoryNode & node, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if_c::is_callable>::type * = 0); template - typename detail::VariableNodeCreator::result_type - senf_console_add_node( - DirectoryNode & node, std::string const & name, Variable const & var, int, - typename boost::disable_if< boost::is_convertible >::type * = 0, - typename boost::disable_if< boost::is_convertible >::type * = 0, - typename boost::disable_if_c::is_callable>::type * = 0); - - template typename detail::VariableNodeCreator::result_type senf_console_add_node(DirectoryNode & node, std::string const & name, boost::reference_wrapper var, int); template - typename detail::VariableNodeCreator::result_type - senf_console_add_node( + VariableAttributor senf_console_add_node( DirectoryNode & node, Owner & owner, std::string const & name, Variable & var, int, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if< boost::is_convertible >::type * = 0, typename boost::disable_if_c::is_callable>::type * = 0); template - typename detail::VariableNodeCreator::result_type - senf_console_add_node( - DirectoryNode & node, Owner & owner, std::string const & name, Variable const & var, int, - typename boost::disable_if< boost::is_convertible >::type * = 0, - typename boost::disable_if< boost::is_convertible >::type * = 0, - typename boost::disable_if_c::is_callable>::type * = 0); - - template typename detail::VariableNodeCreator::result_type senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, boost::reference_wrapper var, int); diff --git a/senf/Utils/Console/Variables.ih b/senf/Utils/Console/Variables.ih index 23a5074..0f703aa 100644 --- a/senf/Utils/Console/Variables.ih +++ b/senf/Utils/Console/Variables.ih @@ -87,7 +87,7 @@ namespace detail { { typedef ConstVariableAttributor result_type; static ConstVariableAttributor add(DirectoryNode & node, std::string const & name, - Variable const & var); + Variable & var); }; #endif diff --git a/senf/Utils/Console/Variables.test.cc b/senf/Utils/Console/Variables.test.cc index cd40365..1a4669b 100644 --- a/senf/Utils/Console/Variables.test.cc +++ b/senf/Utils/Console/Variables.test.cc @@ -100,7 +100,7 @@ namespace { senf::console::ScopedDirectory dir; Test2() : dir(this), var_(0) - { dir.add("var", var_); } + { dir.add("var", boost::ref(var_)); } private: int var_;