#include <iostream>
#include "Server.hh"
#include "Node.hh"
-#include "ObjectDirectory.hh"
+#include "ScopedDirectory.hh"
#include "../Scheduler/Scheduler.hh"
#include "../Utils/Logger/SenfLog.hh"
namespace {
- void fn(std::ostream & output,
- senf::console::CommandNode::Arguments const & arguments) {
- senf::console::CommandNode::Arguments::iterator i (arguments.begin());
- senf::console::CommandNode::Arguments::iterator i_end (arguments.end());
+ void fn(std::ostream & output, senf::console::ParseCommandInfo const & command) {
+ typedef senf::console::ParseCommandInfo::ArgumentsRange::iterator iterator;
+ iterator i (command.arguments().begin());
+ iterator i_end (command.arguments().end());
for (; i != i_end; ++i) {
- senf::console::CommandNode::Arguments::value_type::iterator j (i->begin());
- senf::console::CommandNode::Arguments::value_type::iterator j_end (i->end());
+ iterator::value_type::iterator j (i->begin());
+ iterator::value_type::iterator j_end (i->end());
for (; j != j_end; ++j)
output << j->value() << ' ';
}
struct TestObject
{
- senf::console::ObjectDirectory<TestObject> dir;
+ senf::console::ScopedDirectory<TestObject> dir;
TestObject() : dir(this) {
dir.add("blub", &TestObject::blub)
.doc("Example of a member function");
}
- void blub(std::ostream & output, senf::console::CommandNode::Arguments const & args) {
+ void blub(std::ostream & output, senf::console::ParseCommandInfo const &) {
output << "blub\n";
}
};
- void shutdownServer(std::ostream &,
- senf::console::CommandNode::Arguments const &)
+ void shutdownServer(std::ostream &, senf::console::ParseCommandInfo const &)
{
senf::Scheduler::instance().terminate();
throw senf::console::Executor::ExitException();