X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FOverloadedCommand.cci;h=352e162855a613ff32b9b6cd30def4b35dff7d89;hb=93d9568d448749dc187e7622b733a4a3caa319df;hp=8a5c382557e4dfc324c5bba33e9b65c936652293;hpb=f13780e9e4da7df981d6f6542fbdc714beb34765;p=senf.git diff --git a/senf/Utils/Console/OverloadedCommand.cci b/senf/Utils/Console/OverloadedCommand.cci index 8a5c382..352e162 100644 --- a/senf/Utils/Console/OverloadedCommand.cci +++ b/senf/Utils/Console/OverloadedCommand.cci @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2008 +// Copyright (C) 2008 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund @@ -28,9 +28,9 @@ // Custom includes #define prefix_ inline -///////////////////////////////cci.p/////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::console::OverloadedCommandNode prefix_ senf::console::OverloadedCommandNode::ptr senf::console::OverloadedCommandNode::create() @@ -66,7 +66,7 @@ senf::console::OverloadedCommandNode::shortdoc(std::string const & doc) prefix_ unsigned senf::console::OverloadedCommandNode::overloadIndex(CommandOverload const & overload) { - return find(overloads_.begin(), overloads_.end(), CommandOverload::cptr(&overload)) + return find(overloads_.begin(), overloads_.end(), CommandOverload::cptr(&overload)) - overloads_.begin() + 1; } @@ -80,7 +80,7 @@ senf::console::OverloadedCommandNode::overloads() prefix_ senf::console::OverloadedCommandNode::OverloadedCommandNode() {} -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::console::CommandOverload prefix_ senf::console::CommandOverload::~CommandOverload() @@ -119,7 +119,7 @@ prefix_ std::string senf::console::CommandOverload::doc() prefix_ senf::console::OverloadedCommandNode & senf::console::CommandOverload::node() const { - SENF_ASSERT( node_ ); + SENF_ASSERT( node_, "Overload not added to any node yet" ); return *node_; } @@ -133,7 +133,7 @@ prefix_ senf::console::CommandOverload::CommandOverload() : node_(0) {} -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::console::SimpleCommandOverload prefix_ senf::console::SimpleCommandOverload::ptr @@ -153,7 +153,7 @@ prefix_ senf::console::SimpleCommandOverload::SimpleCommandOverload(Function fn) : fn_ (fn) {} -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::console::SimpleOverloadAttributor prefix_ senf::console::SimpleOverloadAttributor:: @@ -195,15 +195,7 @@ senf::console::SimpleOverloadAttributor::create(DirectoryNode & dir, std::string return node; } -/////////////////////////////////////////////////////////////////////////// - -prefix_ senf::console::SimpleOverloadAttributor -senf::console::factory::Command(SimpleCommandOverload::Function fn) -{ - return SimpleOverloadAttributor(fn); -} - -/////////////////////////////cci.e/////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_