--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief Splitters non-inline non-template implementation */
+
+#include "Splitters.hh"
+//#include "Splitters.ih"
+
+// Custom includes
+
+//#include "Splitters.mpp"
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+prefix_ senf::ppi::connector::ActiveOutput<> &
+senf::ppi::module::ActiveSplitter::newOutput()
+{
+ outputs_.push_back(new connector::ActiveOutput<>());
+ connector::ActiveOutput<> & output (outputs_.back());
+
+ route(input, output);
+
+ return output;
+}
+
+prefix_ void senf::ppi::module::ActiveSplitter::request()
+{
+ Packet p (input());
+ Outputs::iterator i (outputs_.begin());
+ Outputs::iterator const i_end (outputs_.end());
+ for (; i != i_end; ++i)
+ (*i)(p);
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+//#include "Splitters.mpp"
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief Splitters inline non-template implementation */
+
+//#include "Splitters.ih"
+
+// Custom includes
+
+#define prefix_ inline
+///////////////////////////////cci.p///////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////
+// senf::ppi::module::ActiveSplitter
+
+prefix_ senf::ppi::module::ActiveSplitter::ActiveSplitter()
+{
+ noroute(input);
+ input.onRequest(&ActiveSplitter::request);
+}
+
+///////////////////////////////cci.e///////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief Splitters inline template implementation */
+
+//#include "Splitters.ih"
+
+// Custom includes
+#include "Setup.hh"
+
+#define prefix_ inline
+///////////////////////////////cti.p///////////////////////////////////////
+
+template <class Target>
+prefix_ senf::ppi::connector::GenericActiveOutput &
+senf::ppi::connect(module::ActiveSplitter & source, Target & target)
+{
+ return source.connect(target);
+}
+
+template <class Target>
+prefix_ senf::ppi::connector::GenericActiveOutput &
+senf::ppi::module::ActiveSplitter::connect(Target & target)
+{
+ connector::GenericActiveOutput & output (newOutput());
+ ppi::connect(output, target);
+ return output;
+}
+
+
+///////////////////////////////cti.e///////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief Splitters public header */
+
+#ifndef HH_SENF_PPI_Splitters_
+#define HH_SENF_PPI_Splitters_ 1
+
+// Custom includes
+#include <boost/ptr_container/ptr_vector.hpp>
+#include "predecl.hh"
+#include "Connectors.hh"
+#include "Module.hh"
+
+//#include "Splitters.mpp"
+///////////////////////////////hh.p////////////////////////////////////////
+
+namespace senf {
+namespace ppi {
+
+#ifndef DOXYGEN
+
+ template <class Target>
+ connector::GenericActiveOutput & connect(module::ActiveSplitter & source, Target & target);
+
+#endif
+
+namespace module {
+
+ class ActiveSplitter
+ : public Module
+ {
+ SENF_PPI_MODULE(ActiveSplitter);
+ public:
+ connector::PassiveInput<> input;
+
+ ActiveSplitter();
+
+ private:
+ connector::ActiveOutput<> & newOutput();
+
+#ifndef DOXYGEN
+ public:
+#endif
+ template <class Target>
+ connector::GenericActiveOutput & connect(Target & target);
+
+ private:
+ void request();
+
+ typedef boost::ptr_vector<connector::ActiveOutput<> > Outputs;
+ Outputs outputs_;
+ };
+
+}}}
+
+
+
+///////////////////////////////hh.e////////////////////////////////////////
+#include "Splitters.cci"
+//#include "Splitters.ct"
+#include "Splitters.cti"
+#endif
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief Splitters.test unit tests */
+
+//#include "Splitters.test.hh"
+//#include "Splitters.test.ih"
+
+// Custom includes
+#include "Splitters.hh"
+#include "DebugModules.hh"
+#include "Setup.hh"
+#include "../Packets/Packets.hh"
+
+#include "../Utils/auto_unit_test.hh"
+#include <boost/test/test_tools.hpp>
+
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+namespace ppi = senf::ppi;
+namespace connector = ppi::connector;
+namespace module = ppi::module;
+namespace debug = module::debug;
+
+BOOST_AUTO_UNIT_TEST(activeSplitter)
+{
+ debug::ActiveSource source;
+ module::ActiveSplitter splitter;
+ debug::PassiveSink sink1;
+ debug::PassiveSink sink2;
+
+ ppi::connect(source, splitter);
+ ppi::connect(splitter, sink1);
+ ppi::connect(splitter, sink2);
+ ppi::init();
+
+ senf::Packet p (senf::DataPacket::create());
+
+ source.submit(p);
+ BOOST_CHECK_EQUAL( sink1.size(), 1u );
+ BOOST_CHECK_EQUAL( sink2.size(), 1u );
+ BOOST_CHECK( sink1.pop_front() == p );
+ BOOST_CHECK( sink2.pop_front() == p );
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
}
class PassiveJoin;
class PriorityJoin;
+ class ActiveSplitter;
}
namespace connector {
#include "ConfigFile.hh"
#include "ProgramOptions.hh"
#include "Sysdir.hh"
+#include "STLSupport.hh"
///////////////////////////////hh.e////////////////////////////////////////
//#include "Console.cci"
return *dir.back().lock();
}
DirectoryNode & base (*dir.back().lock());
- if (tok == WordToken("."))
+ if (tok == WordToken(".") || tok == NoneToken())
return base;
std::string const & name (complete(base, tok.value()));
if (policy_)
return next();
-# undef HaveArg
+# undef ProcessArg
}
template <class Overload, unsigned index, bool flag>
# define BOOST_PP_ITERATION_PARAMS_1 \
(4, (1, BOOST_PARAMETER_MAX_ARITY, \
- SENF_ABSOLUTE_INCLUDE_PATH(Utils/Console/ParsedCommand.mpp), \
+ SENF_ABSOLUTE_INCLUDE_PATH(Utils/Console/ParsedCommand.mpp), \
5))
# include BOOST_PP_ITERATE()
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief VectorSupport non-inline template implementation */
+
+//#include "VectorSupport.ih"
+
+// Custom includes
+
+#define prefix_
+///////////////////////////////ct.p////////////////////////////////////////
+
+#ifndef DOXYGEN
+
+template <class Sequence>
+prefix_ void senf::console::SequenceArgumentTraits<Sequence>::
+parse(ParseCommandInfo::TokensRange const & tokens, type & out)
+{
+ out.clear();
+ CheckedArgumentIteratorWrapper arg (tokens);
+ while (arg) {
+ out.push_back(typename Sequence::value_type());
+ senf::console::parse( *(arg++), out.back() );
+ }
+}
+
+template <class Sequence>
+prefix_ std::string senf::console::SequenceArgumentTraits<Sequence>::description()
+{
+ std::string type (prettyName(typeid(Sequence)));
+ std::string::size_type e (type.find('<'));
+ if (e == std::string::npos) e = type.size();
+ std::string::size_type b (type.rfind(':', e));
+ if (b == std::string::npos) b = 0; else ++b;
+ return type.substr(b,e-b) + "<"
+ + ArgumentTraits<typename Sequence::value_type>::description() + ">";
+}
+
+template <class Sequence>
+prefix_ std::string senf::console::SequenceArgumentTraits<Sequence>::str(type const & value)
+{
+ std::stringstream ss;
+ senf::console::format(value, ss);
+ return ss.str();
+}
+
+template <class Sequence>
+prefix_ void senf::console::SequenceReturnValueTraits<Sequence>::format(type const & value,
+ std::ostream & os)
+{
+ os << "(";
+ typename type::const_iterator i (value.begin());
+ typename type::const_iterator const i_end (value.end());
+ if (i != i_end)
+ for (;;) {
+ senf::console::format(*i, os);
+ if (++i == i_end)
+ break;
+ else
+ os << " ";
+ }
+ os << ")";
+}
+
+#endif
+
+///////////////////////////////ct.e////////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief STLSupport public header */
+
+#ifndef HH_SENF_Utils_Console_STLSupport_
+#define HH_SENF_Utils_Console_STLSupport_ 1
+
+// Custom includes
+#include <vector>
+#include <list>
+#include "Traits.hh"
+
+//#include "STLSupport.mpp"
+///////////////////////////////hh.p////////////////////////////////////////
+
+namespace senf {
+namespace console {
+
+#ifndef DOXYGEN
+
+ template <class Sequence>
+ struct SequenceArgumentTraits
+ {
+ typedef Sequence type;
+
+ static void parse(ParseCommandInfo::TokensRange const & tokens, type & out);
+ static std::string description();
+ static std::string str(type const & value);
+ };
+
+ template <class Sequence>
+ struct SequenceReturnValueTraits
+ {
+ typedef Sequence type;
+
+ static void format(type const & value, std::ostream & os);
+ };
+
+ template <class T, class Alloc>
+ struct ArgumentTraits< std::vector<T,Alloc> >
+ : public SequenceArgumentTraits< std::vector<T,Alloc> >
+ {};
+
+ template <class T, class Alloc>
+ struct ReturnValueTraits< std::vector<T,Alloc> >
+ : public SequenceReturnValueTraits< std::vector<T,Alloc> >
+ {};
+
+ template <class T, class Alloc>
+ struct ArgumentTraits< std::list<T,Alloc> >
+ : public SequenceArgumentTraits< std::list<T,Alloc> >
+ {};
+
+ template <class T, class Alloc>
+ struct ReturnValueTraits< std::list<T,Alloc> >
+ : public SequenceReturnValueTraits< std::list<T,Alloc> >
+ {};
+
+#endif
+
+}}
+
+///////////////////////////////hh.e////////////////////////////////////////
+//#include "STLSupport.cci"
+#include "STLSupport.ct"
+//#include "STLSupport.cti"
+#endif
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2009
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief STLSupport.test unit tests */
+
+//#include "STLSupport.test.hh"
+//#include "STLSupport.test.ih"
+
+// Custom includes
+#include <boost/assign/list_of.hpp>
+#include "STLSupport.hh"
+#include "ParsedCommand.hh"
+#include "Executor.hh"
+#include "Parse.hh"
+#include "ScopedDirectory.hh"
+
+#include "../../Utils/auto_unit_test.hh"
+#include <boost/test/test_tools.hpp>
+
+#define prefix_
+///////////////////////////////cc.p////////////////////////////////////////
+
+namespace {
+
+ int vectorTest(std::vector<int> const & data)
+ {
+ int sum (0);
+ for (std::vector<int>::const_iterator i (data.begin()); i != data.end(); ++i)
+ sum += *i;
+ return sum;
+ }
+
+ int listTest(std::list<int> const & data)
+ {
+ int sum (0);
+ for (std::list<int>::const_iterator i (data.begin()); i != data.end(); ++i)
+ sum += *i;
+ return sum;
+ }
+
+}
+
+BOOST_AUTO_UNIT_TEST(vectorSupport)
+{
+ senf::console::Executor executor;
+ senf::console::CommandParser parser;
+ senf::console::ScopedDirectory<> dir;
+ senf::console::root().add("test", dir);
+
+ std::vector<int> defv (boost::assign::list_of(7)(2).to_container(defv));
+ dir.add("test", &vectorTest)
+ .arg("data", "test data", senf::console::kw::default_value = defv);
+ std::stringstream ss;
+
+ BOOST_CHECK_NO_THROW(
+ parser.parse("test/test; test/test (); test/test 5; test/test (13); test/test (4 5 8)",
+ boost::bind<void>( boost::ref(executor), boost::ref(ss), _1 )) );
+ BOOST_CHECK_EQUAL( ss.str(), "9\n" "0\n" "5\n" "13\n" "17\n" );
+
+ ss.str("");
+ BOOST_CHECK_NO_THROW(
+ parser.parse("help test/test",
+ boost::bind<void>( boost::ref(executor), boost::ref(ss), _1 )) );
+ BOOST_CHECK_EQUAL(
+ ss.str(),
+ "Usage:\n"
+ " test [data:vector<int>]\n"
+ "\n"
+ "With:\n"
+ " data test data\n"
+ " default: (7 2)\n" );
+}
+
+BOOST_AUTO_UNIT_TEST(listSupport)
+{
+ senf::console::Executor executor;
+ senf::console::CommandParser parser;
+ senf::console::ScopedDirectory<> dir;
+ senf::console::root().add("test", dir);
+
+ std::list<int> defv (boost::assign::list_of(7)(2).to_container(defv));
+ dir.add("test", &listTest)
+ .arg("data", "test data", senf::console::kw::default_value = defv);
+ std::stringstream ss;
+
+ BOOST_CHECK_NO_THROW(
+ parser.parse("test/test; test/test (); test/test 5; test/test (13); test/test (4 5 8)",
+ boost::bind<void>( boost::ref(executor), boost::ref(ss), _1 )) );
+ BOOST_CHECK_EQUAL( ss.str(), "9\n" "0\n" "5\n" "13\n" "17\n" );
+
+ ss.str("");
+ BOOST_CHECK_NO_THROW(
+ parser.parse("help test/test",
+ boost::bind<void>( boost::ref(executor), boost::ref(ss), _1 )) );
+ BOOST_CHECK_EQUAL(
+ ss.str(),
+ "Usage:\n"
+ " test [data:list<int>]\n"
+ "\n"
+ "With:\n"
+ " data test data\n"
+ " default: (7 2)\n" );
+}
+
+///////////////////////////////cc.e////////////////////////////////////////
+#undef prefix_
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
#include "Server.ih"
// Custom includes
+#include <errno.h>
#include <iostream>
#include <boost/algorithm/string/trim.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
: handle_ (handle),
event_ ("senf::console::Server", senf::membind(&Server::newClient, this),
handle_, scheduler::FdEvent::EV_READ),
- root_ (senf::console::root().thisptr()), mode_ (Automatic)
+ root_ (senf::console::root().thisptr()), mode_ (Automatic),
+ name_ (::program_invocation_short_name)
{}
prefix_ void senf::console::Server::newClient(int event)
}
template <class Type>
+prefix_ void senf::console::format(Type const & value, std::ostream & os)
+{
+ ReturnValueTraits<Type>::format(value, os);
+}
+
+template <class Type>
prefix_ std::string senf::console::ArgumentTraits<Type>::description()
{
std::string type (prettyName(typeid(Type)));
prefix_ std::string senf::console::ArgumentTraits<Type>::str(Type const & value)
{
std::stringstream ss;
- senf::console::ReturnValueTraits<Type>::format(value, ss);
+ senf::console::format(value, ss);
return ss.str();
}
template <class Type>
void parse(ParseCommandInfo::TokensRange const & tokens, Type & out);
+ template <class Type>
+ void format(Type const & value, std::ostream & os);
+
#ifndef DOXYGEN
// Parse bool: true/false, yes/no, enabled/disabled, 0/1
///////////////////////////////////////////////////////////////////////////
- void prompt(std::string const & text); ///< Set prompt string
- void set(std::string const & text, unsigned pos = 0u);
- ///< Set edit buffer contents
- /**< The edit buffer contents will be replaced by \a
- text. The cursor will be placed at position \a pos
- within this text. */
-
///\name Overall edit control
///\{
void clear(); ///< Clear editor buffer
void redisplay(); ///< Mark the editor buffer for redisplay
void forceRedisplay(); ///< Redisplay the editor buffer \e now
+ void prompt(std::string const & text); ///< Set prompt string
///\}
void deleteChar(unsigned n=1); ///< Delete \a n characters at point
void insert(char ch); ///< Insert \a ch at point
void insert(std::string const & text); ///< Insert \a text at point
+ void set(std::string const & text, unsigned pos = 0u);
+ ///< Set edit buffer contents
+ /**< The edit buffer contents will be replaced by \a
+ text. The cursor will be placed at position \a pos
+ within this text. */
///\}
'${profile and "profile=1" or None}' ],
CPPDEFINES = [ '${not(final) and "SENF_DEBUG" or None}' ] )
- env.Default(
- env.AlwaysBuild(
- env.Command('senf/libsenf.a', [], [ 'scons -C %s $SENF_BUILDOPTS libsenf.a' % os.path.realpath('senf')])))
+ #env.Default(
+ # env.AlwaysBuild(
+ # env.Command('senf/libsenf.a', [], [ 'scons -C %s $SENF_BUILDOPTS libsenf.a' % os.path.realpath('senf')])))
else:
print '\nUsing global SENF\n'