X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FScopedDirectory.hh;h=cd5b9b4e2856ece133615e3281736368005e6f7c;hb=1863c038d0400159ce49b851a5b81c2ce698c684;hp=c226b2e94101eafda536ff4b0aafb07c6b32586a;hpb=869df8df564cd4f4934d4cd1c1b290c2aeabbd92;p=senf.git diff --git a/Console/ScopedDirectory.hh b/Console/ScopedDirectory.hh index c226b2e..cd5b9b4 100644 --- a/Console/ScopedDirectory.hh +++ b/Console/ScopedDirectory.hh @@ -49,7 +49,7 @@ namespace console { * static_cast(0), * static_cast(0), * static_cast(0), - * static_cast(0), + * static_cast(0), * static_cast(0)) ) base_type; typedef typename senf::remove_cvref::type value_type; @@ -59,7 +59,7 @@ namespace console { /// Internal struct Creator { static result_type create(DirectoryNode & node, Owner & owner, - std::string const & name, Object const & ob); + std::string const & name, Object & ob); }; }; @@ -157,12 +157,20 @@ namespace console { implementation just forwards the call to the proxied directory node. */ + template + typename OwnerNodeCreateTraits::result_type add(std::string const & name, + Object & ob); + ///< Create new child node + /**< \see add() */ + protected: private: Owner * owner_; }; +#ifndef DOXYGEN + template <> class ScopedDirectory : public ScopedDirectoryBase { @@ -170,9 +178,12 @@ namespace console { template typename NodeCreateTraits::result_type add(std::string const & name, Object const & ob); + + template + typename NodeCreateTraits::result_type add(std::string const & name, + Object & ob); }; -#ifndef DOXYGEN template SimpleCommandNode & senf_console_add_node( DirectoryNode & node, Owner & owner, std::string const & name, Function const & fn, ...);