Socket/NetdeviceController: added promisc() methods
[senf.git] / Utils / Console / Mainpage.dox
index eb39f76..b46ce64 100644 (file)
     The first possibility to control this is to change the root node. This is done by 
     \li passing that root node to the helper class or to the parse helper as an additional argument
         (see the respective documentation).
-    \li passing it to the senf:;console::ConfigBundle constructor when parsing multiple sources.
+    \li passing it to the senf::console::ConfigBundle constructor when parsing multiple sources.
     
     for example:
 
         .add("over", static_cast<void (*)(int)>(&over));
     senf::console::root()
         .add("over", static_cast<void (*)(int,int)>(&over));
+        
+    class SomeModule {
+      senf::console::ScopedDirectory<SomeModule> dir;
+      
+      unsigned int overlodedMethod() const {....};
+      void overlodedMethod(unsigned int)   {....};
+        
+      void addConsoleCommands() {
+        dir.node().add("overlodedMethod", senf::membind(
+            static_cast<unsigned int (SomeModule::*)() const>(&SomeModule::overlodedMethod), this));
+        dir.node().add("overlodedMethod", senf::membind(
+            static_cast<void (SomeModule::*)(unsigned int)>(&SomeModule::overlodedMethod), this));
+      }
+    }
     \endcode