Revert bad karmic-fix changes
g0dil [Wed, 20 Jan 2010 19:44:26 +0000 (19:44 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1548 270642c3-0616-0410-b53a-bc976706d245

19 files changed:
senf/Utils/Console/Config.test.cc
senf/Utils/Console/ConfigFile.test.cc
senf/Utils/Console/Executor.test.cc
senf/Utils/Console/Node.test.cc
senf/Utils/Console/OverloadedCommand.test.cc
senf/Utils/Console/Parse.test.cc
senf/Utils/Console/ParsedCommand.test.cc
senf/Utils/Console/ProgramOptions.test.cc
senf/Utils/Console/STLSupport.test.cc
senf/Utils/Console/ScopedDirectory.cti
senf/Utils/Console/ScopedDirectory.test.cc
senf/Utils/Console/Server.test.cc
senf/Utils/Console/Traits.test.cc
senf/Utils/Console/UDPServer.test.cc
senf/Utils/Console/Utility.test.cc
senf/Utils/Console/Variables.cti
senf/Utils/Console/Variables.hh
senf/Utils/Console/Variables.ih
senf/Utils/Console/Variables.test.cc

index 2058a54..5be47ca 100644 (file)
 //#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 <boost/filesystem/operations.hpp>
 
 #include <senf/Utils/auto_unit_test.hh>
index 3f635a6..adf4f34 100644 (file)
 //#include "ConfigFile.test.ih"
 
 // Custom includes
-#include "ConfigFile.hh"
+#include "Console.hh"
 #include <fstream>
-#include "ScopedDirectory.hh"
-#include "ParsedCommand.hh"
 #include <boost/filesystem/operations.hpp>
 
 #include <senf/Utils/auto_unit_test.hh>
index 80e2653..0a6a6db 100644 (file)
@@ -29,7 +29,7 @@
 // Custom includes
 #include <sstream>
 #include <vector>
-#include "Executor.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index 46bf919..f72da5e 100644 (file)
@@ -28,7 +28,7 @@
 
 // Custom includes
 #include <sstream>
-#include "Node.hh"
+#include "Console.hh"
 #include <boost/iterator/transform_iterator.hpp>
 
 #include <senf/Utils/auto_unit_test.hh>
@@ -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<void(std::ostream&,senf::console::ParseCommandInfo const &)>(Functor()));
     
     senf::console::ParseCommandInfo info;
 
index bce2c86..892f21e 100644 (file)
@@ -28,7 +28,7 @@
 
 // Custom includes
 #include <sstream>
-#include "OverloadedCommand.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index dc9bafb..0f2e150 100644 (file)
@@ -31,7 +31,7 @@
 
 // Custom includes
 #include <sstream>
-#include "Parse.hh"
+#include "Console.hh"
 #include "Parse.ih"
 #include <senf/Utils/String.hh>
 
index 698c6da..8a4a7bb 100644 (file)
 // Custom includes
 #include <iostream>
 #include <sstream>
-#include "ParsedCommand.hh"
-#include "Executor.hh"
-#include "Parse.hh"
-#include "ScopedDirectory.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index d063473..6fdcbc4 100644 (file)
@@ -27,9 +27,7 @@
 //#include "ProgramOptions.test.ih"
 
 // Custom includes
-#include "ProgramOptions.hh"
-#include "ScopedDirectory.hh"
-#include "ParsedCommand.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index ddc78dc..37c9af2 100644 (file)
 
 // Custom includes
 #include <boost/assign/list_of.hpp>
-#include "STLSupport.hh"
-#include "ParsedCommand.hh"
-#include "Executor.hh"
-#include "Parse.hh"
-#include "ScopedDirectory.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index 69b70fa..f379c4e 100644 (file)
@@ -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<void (std::ostream&,ParseCommandInfo const &)>(
+                        boost::bind(fn,boost::ref(owner),_1,_2)));
 }
 
 template <class Owner>
index f94ebeb..801de49 100644 (file)
@@ -28,7 +28,7 @@
 
 // Custom includes
 #include <sstream>
-#include "ScopedDirectory.hh"
+#include "Console.hh"
 #include <boost/iterator/transform_iterator.hpp>
 
 #include <senf/Utils/auto_unit_test.hh>
index 45bb758..a8047b9 100644 (file)
@@ -27,7 +27,7 @@
 //#include "Server.test.ih"
 
 // Custom includes
-#include "Server.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index ae8cd33..a6a1b41 100644 (file)
 //#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 <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index c4dc8a9..3cd8b2e 100644 (file)
@@ -27,7 +27,7 @@
 //#include "UDPServer.test.ih"
 
 // Custom includes
-#include "UDPServer.hh"
+#include "Console.hh"
 
 #include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index 2ec5ab7..b9100df 100644 (file)
 //#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 <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
index 1d19fbd..e5a311c 100644 (file)
@@ -200,7 +200,7 @@ template <class Variable>
 prefix_ senf::console::ConstVariableAttributor<Variable>
 senf::console::detail::VariableNodeCreator<Variable, true>::add(DirectoryNode & node,
                                                                 std::string const & name,
-                                                                Variable const & var)
+                                                                Variable & var)
 {
     typename VariableAttributor<Variable>::QueryOverload & queryOverload ( 
         node.add(name, typename detail::QueryVariable<Variable>::Function(
@@ -212,8 +212,7 @@ senf::console::detail::VariableNodeCreator<Variable, true>::add(DirectoryNode &
 #ifndef DOXYGEN
 
 template <class Variable>
-prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
-senf::console::
+prefix_ senf::console::VariableAttributor<Variable> senf::console::
 senf_console_add_node(DirectoryNode & node, std::string const & name, Variable & var, int,
                       typename boost::disable_if< boost::is_convertible<Variable*, ScopedDirectoryBase*> >::type *,
                       typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type *, 
@@ -223,28 +222,15 @@ senf_console_add_node(DirectoryNode & node, std::string const & name, Variable &
 }
 
 template <class Variable>
-prefix_ typename senf::console::detail::VariableNodeCreator<Variable const>::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<Variable*, ScopedDirectoryBase*> >::type *,
-                      typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type *, 
-                      typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type *)
-{
-    return detail::VariableNodeCreator<Variable const>::add(node, name, var);
-}
-
-template <class Variable>
 prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
-senf::console::
-senf_console_add_node(DirectoryNode & node, std::string const & name,
-                      boost::reference_wrapper<Variable> var, int)
+senf::console::senf_console_add_node(DirectoryNode & node, std::string const & name,
+                                     boost::reference_wrapper<Variable> var, int)
 {
     return detail::VariableNodeCreator<Variable>::add(node, name, var.get());
 }
 
 template <class Variable, class Owner>
-prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
-senf::console::
+prefix_ senf::console::VariableAttributor<Variable> senf::console::
 senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name,
                       Variable & var, int,
                       typename boost::disable_if< boost::is_convertible<Variable*, ScopedDirectoryBase*> >::type *, 
@@ -255,18 +241,6 @@ senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & n
 }
 
 template <class Variable, class Owner>
-prefix_ typename senf::console::detail::VariableNodeCreator<Variable const>::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<Variable*, ScopedDirectoryBase*> >::type *, 
-                      typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type *, 
-                      typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type *)
-{
-    return detail::VariableNodeCreator<Variable const>::add(node, name, var);
-}
-
-template <class Variable, class Owner>
 prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
 senf::console::senf_console_add_node(DirectoryNode & node, Owner &,
                                      std::string const & name,
index 658630b..4f93a93 100644 (file)
@@ -47,43 +47,25 @@ namespace console {
 #ifndef DOXYGEN
 
     template <class Variable>
-    typename detail::VariableNodeCreator<Variable>::result_type
-    senf_console_add_node(
+    VariableAttributor<Variable> senf_console_add_node(
         DirectoryNode & node, std::string const & name, Variable & var, int,
         typename boost::disable_if< boost::is_convertible<Variable*, ScopedDirectoryBase*> >::type * = 0,
         typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type * = 0,
         typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type * = 0);
 
     template <class Variable>
-    typename detail::VariableNodeCreator<Variable const>::result_type
-    senf_console_add_node(
-        DirectoryNode & node, std::string const & name, Variable const & var, int,
-        typename boost::disable_if< boost::is_convertible<Variable*, ScopedDirectoryBase*> >::type * = 0,
-        typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type * = 0,
-        typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type * = 0);
-
-    template <class Variable>
     typename detail::VariableNodeCreator<Variable>::result_type
     senf_console_add_node(DirectoryNode & node, std::string const & name, 
                           boost::reference_wrapper<Variable> var, int);
 
     template <class Variable, class Owner>
-    typename detail::VariableNodeCreator<Variable>::result_type
-    senf_console_add_node(
+    VariableAttributor<Variable> senf_console_add_node(
         DirectoryNode & node, Owner & owner, std::string const & name, Variable & var, int,
         typename boost::disable_if< boost::is_convertible<Variable*, ScopedDirectoryBase*> >::type * = 0,
         typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type * = 0,
         typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type * = 0);
 
     template <class Variable, class Owner>
-    typename detail::VariableNodeCreator<Variable const>::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<Variable*, ScopedDirectoryBase*> >::type * = 0,
-        typename boost::disable_if< boost::is_convertible<Variable*, GenericNode*> >::type * = 0,
-        typename boost::disable_if_c<detail::ParsedCommandTraits<Variable>::is_callable>::type * = 0);
-
-    template <class Variable, class Owner>
     typename detail::VariableNodeCreator<Variable>::result_type
     senf_console_add_node(DirectoryNode & node, Owner & owner, std::string const & name, 
                           boost::reference_wrapper<Variable> var, int);
index 23a5074..0f703aa 100644 (file)
@@ -87,7 +87,7 @@ namespace detail {
     {
         typedef ConstVariableAttributor<Variable> result_type;
         static ConstVariableAttributor<Variable> add(DirectoryNode & node, std::string const & name,
-                                                     Variable const & var);
+                                                     Variable & var);
     };
 
 #endif
index cd40365..1a4669b 100644 (file)
@@ -100,7 +100,7 @@ namespace {
         senf::console::ScopedDirectory<Test2> dir;
         
         Test2() : dir(this), var_(0)
-            { dir.add("var", var_); }
+            { dir.add("var", boost::ref(var_)); }
         
     private:
         int var_;