// $Id$
//
-// Copyright (C) 2008
+// Copyright (C) 2008
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
#include <senf/Utils/intrusive_refcount.hh>
#include <senf/Utils/DiscardStream.hh>
-///////////////////////////////ih.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
namespace console {
namespace detail {
/** \brief Internal: Executor wrapper implementing restricted execution
-
+
A RestrictedExecutor will only process commands which a re children of a given node. It does
\e not follow any links.
*/
public:
typedef void result_type;
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
//\/name Structors and default members
- ///\{
+ //\{
RestrictedExecutor(DirectoryNode & root = senf::console::root());
- ///\}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-/////////////////////////////////////////////////////////////////////////////////////////
void execute(std::ostream & output, ParseCommandInfo const & command);
///< Execute command
- /**< Output will be written to \a output.
+ /**< Output will be written to \a output.
Same as operator()(). */
void operator()(std::ostream & output, ParseCommandInfo const & command);
///< Execute command
- /**< Output will be written to \a output.
+ /**< Output will be written to \a output.
Same as execute(). */
GenericNode & getNode(ParseCommandInfo const & command);
};
/** \brief Internal: Set restricted node of a RestrictedExecutor
-
+
A RestrictGuard will set the node to which to restrict. It will automatically reset the node
in it's destructor.
*/
class RestrictedExecutor::RestrictGuard
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
//\/name Structors and default members
- ///\{
+ //\{
explicit RestrictGuard(RestrictedExecutor & executor);
RestrictGuard(RestrictedExecutor & executor, DirectoryNode & restrict);
~RestrictGuard();
- ///\}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-/////////////////////////////////////////////////////////////////////////////////////////
protected:
}}}
-///////////////////////////////ih.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#endif
\f