Fix karmic build
g0dil [Tue, 19 Jan 2010 09:05:47 +0000 (09:05 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1547 270642c3-0616-0410-b53a-bc976706d245

senf/Utils/Console/ScopedDirectory.cti
senf/Utils/Console/ScopedDirectory.hh
senf/Utils/Console/Variables.cti
senf/Utils/Console/Variables.hh
senf/Utils/Console/Variables.ih
senf/Utils/Termlib/Telnet.hh
senf/Utils/type_traits.mpp
senf/Utils/type_traits.test.cc

index b93344c..69b70fa 100644 (file)
@@ -56,7 +56,7 @@ prefix_ senf::console::ScopedDirectory<Owner>::ScopedDirectory(Owner * owner)
 
 template <class Owner>
 template <class Object>
-prefix_ typename senf::console::OwnerNodeCreateTraits<Owner, Object>::result_type
+prefix_ typename senf::console::OwnerNodeCreateTraits<Owner, Object const>::result_type
 senf::console::ScopedDirectory<Owner>::add(std::string const & name, Object const & ob)
 {
     return OwnerNodeCreateTraits<Owner, Object const>::Creator::create(node(), *owner_, name, ob);
index 1712f9f..0613d10 100644 (file)
@@ -151,8 +151,8 @@ namespace console {
         ///////////////////////////////////////////////////////////////////////////
 
         template <class Object>
-        typename OwnerNodeCreateTraits<Owner, Object>::result_type add(std::string const & name,
-                                                                       Object const & ob);
+        typename OwnerNodeCreateTraits<Owner, Object const>::result_type add(
+            std::string const & name, Object const & ob);
                                         ///< Create new child node
                                         /**< Adds a new child node to the (proxied)
                                              DirectoryNode. How the node is added is configured
@@ -161,8 +161,8 @@ namespace console {
                                              directory node. */
 
         template <class Object>
-        typename OwnerNodeCreateTraits<Owner, Object>::result_type add(std::string const & name,
-                                                                       Object & ob);
+        typename OwnerNodeCreateTraits<Owner, Object>::result_type add(
+            std::string const & name, Object & ob);
                                         ///< Create new child node
                                         /**< \see add() */
 
index e5a311c..1d19fbd 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 & var)
+                                                                Variable const & var)
 {
     typename VariableAttributor<Variable>::QueryOverload & queryOverload ( 
         node.add(name, typename detail::QueryVariable<Variable>::Function(
@@ -212,7 +212,8 @@ senf::console::detail::VariableNodeCreator<Variable, true>::add(DirectoryNode &
 #ifndef DOXYGEN
 
 template <class Variable>
-prefix_ senf::console::VariableAttributor<Variable> senf::console::
+prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
+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 *, 
@@ -222,15 +223,28 @@ 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_ senf::console::VariableAttributor<Variable> senf::console::
+prefix_ typename senf::console::detail::VariableNodeCreator<Variable>::result_type
+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 *, 
@@ -241,6 +255,18 @@ 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 4f93a93..658630b 100644 (file)
@@ -47,25 +47,43 @@ namespace console {
 #ifndef DOXYGEN
 
     template <class Variable>
-    VariableAttributor<Variable> senf_console_add_node(
+    typename detail::VariableNodeCreator<Variable>::result_type
+    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>
-    VariableAttributor<Variable> senf_console_add_node(
+    typename detail::VariableNodeCreator<Variable>::result_type
+    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 0f703aa..23a5074 100644 (file)
@@ -87,7 +87,7 @@ namespace detail {
     {
         typedef ConstVariableAttributor<Variable> result_type;
         static ConstVariableAttributor<Variable> add(DirectoryNode & node, std::string const & name,
-                                                     Variable & var);
+                                                     Variable const & var);
     };
 
 #endif
index e127a95..7fb7eab 100644 (file)
@@ -259,23 +259,23 @@ namespace term {
         void timeout();
 
         enum Command { 
-            CMD_NONE = 0,
-            CMD_SE = 240,
-            CMD_NOP = 241,
-            CMD_DM = 242,
-            CMD_BRK = 243,
-            CMD_IP = 244,
-            CMD_AO = 245,
-            CMD_AYT = 246,
-            CMD_EC = 247,
-            CMD_EL = 248,
-            CMD_GA = 249,
-            CMD_SB = 250,
-            CMD_WILL = 251,
-            CMD_WONT = 252,
-            CMD_DO = 253,
-            CMD_DONT = 254,
-            CMD_IAC = 255,
+            CMD_NONE = static_cast<char>(0),
+            CMD_SE = static_cast<char>(240),
+            CMD_NOP = static_cast<char>(241),
+            CMD_DM = static_cast<char>(242),
+            CMD_BRK = static_cast<char>(243),
+            CMD_IP = static_cast<char>(244),
+            CMD_AO = static_cast<char>(245),
+            CMD_AYT = static_cast<char>(246),
+            CMD_EC = static_cast<char>(247),
+            CMD_EL = static_cast<char>(248),
+            CMD_GA = static_cast<char>(249),
+            CMD_SB = static_cast<char>(250),
+            CMD_WILL = static_cast<char>(251),
+            CMD_WONT = static_cast<char>(252),
+            CMD_DO = static_cast<char>(253),
+            CMD_DONT = static_cast<char>(254),
+            CMD_IAC = static_cast<char>(255),
         };
 
         struct OptInfo
index eaf46c7..2b0eb3c 100644 (file)
@@ -82,6 +82,18 @@ struct function_traits_arg_type<Traits, mpp_ArgN(), true>
     typedef typename Traits::mpp_CurArg() type;
 };
 
+template <class C, class T mpp_TrailTplArgs() > 
+struct remove_member_pointer <T (C::*)( mpp_Args() ) const>
+{
+    typedef T type (mpp_Args());
+};
+
+template <class C, class T mpp_TrailTplArgs() > 
+struct remove_member_pointer <T (C::* const)( mpp_Args() ) const>
+{
+    typedef T type (mpp_Args());
+};
+
 // ////////////////////////////////////////////////////////////////////////
 #endif // /////////////////////////////////////////////////////////////////
 // ////////////////////////////////////////////////////////////////////////
index 9b1c3ab..16b9b3f 100644 (file)
@@ -38,7 +38,7 @@
 ///////////////////////////////cc.p////////////////////////////////////////
 
 namespace {
-    struct Class {};
+    struct Class;
 }
 
 BOOST_AUTO_UNIT_TEST(typeTraits)
@@ -60,11 +60,35 @@ BOOST_AUTO_UNIT_TEST(typeTraits)
     >::value ));
 
     BOOST_STATIC_ASSERT(( boost::is_same< 
-        senf::remove_member_pointer< int (Class::*) >::type, 
-        int 
+        senf::remove_member_pointer< Class (Class::*) >::type, 
+        Class 
     >::value ));
     BOOST_STATIC_ASSERT(( boost::is_same< 
-        senf::remove_member_pointer< void (Class::*)(int) >::type, 
+        senf::remove_member_pointer< Class const (Class::*) >::type, 
+        Class const
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< Class (Class::*)(int) >::type, 
+        Class (int)
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< Class const (Class::*)(int) >::type, 
+        Class const (int)
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< void (Class::*)(int) const>::type, 
+        void (int)
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< Class const (Class::*)(int) const>::type, 
+        Class const (int)
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< void (Class::* const)(int)>::type, 
+        void (int)
+    >::value ));
+    BOOST_STATIC_ASSERT(( boost::is_same< 
+        senf::remove_member_pointer< void (Class::* const)(int) const>::type, 
         void (int)
     >::value ));
 
@@ -97,6 +121,7 @@ BOOST_AUTO_UNIT_TEST(typeTraits)
     BOOST_STATIC_ASSERT((   senf::is_any_function< void () >::value ));
     BOOST_STATIC_ASSERT((   senf::is_any_function< void (*)(int) >::value ));
     BOOST_STATIC_ASSERT((   senf::is_any_function< void (Class::*)() >::value ));
+    BOOST_STATIC_ASSERT((   senf::is_any_function< void (Class::*)() const >::value ));
     BOOST_STATIC_ASSERT(( ! senf::is_any_function< int * >::value ));
 
     BOOST_STATIC_ASSERT(( boost::is_same<