From: g0dil Date: Thu, 23 Apr 2009 15:12:16 +0000 (+0000) Subject: Utils/Logger: Add missing FileTarget::filname() member X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=d677b6337f001480fccd73889bab3d62e719826b;p=senf.git Utils/Logger: Add missing FileTarget::filname() member PPI: Documentation git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1196 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/Connectors.hh b/PPI/Connectors.hh index 4f18a78..78b7023 100644 --- a/PPI/Connectors.hh +++ b/PPI/Connectors.hh @@ -97,6 +97,42 @@ namespace connector { }; \endcode + + \section ppi_jacks Jacks + + A Jack is a packet type aware and possibly packet type converting reference to an arbitrary + connector of the same type. Jacks are used in groups to indirectly declare the input's and + output's + + \code + class MyGroup + { + private: + senf::ppi::module::PassiveQueue queue; + senf::ppi::module::RateAnalyzer analyzer; + + public: + senf::ppi::connector::ActiveInputJack input; + senf::ppi::connector::ActiveOutputJack output; + + MyGroup() + : queue (), analyzer (), input (queue.input), output (analyzer.output) + { + senf::ppi::connect(queue, analyzer); + } + }; + \endcode + + The jacks are initialized by passing an arbitrary compatible connector to the jack + constructor. A connector is compatible, if + \li It has the same input/output active/passive specification + \li Either the Jack or the Connector are generic (senf::Packet) or Jack and Connector have + the same packet type + + Jacks can be used wherever connectors may be used. Jacks may be defined anywhere, not only + in modules. It is however important to ensure that the lifetime of the jack does not exceed + the lifetime of the referenced connector. + \see senf::ppi::module::Module \n senf::ppi::connect() \n diff --git a/PPI/Jack.hh b/PPI/Jack.hh index 83657ba..03c3278 100644 --- a/PPI/Jack.hh +++ b/PPI/Jack.hh @@ -38,58 +38,70 @@ namespace senf { namespace ppi { namespace connector { + /** \brief Connector Jack base class + \see \ref ppi_jacks */ class Jack : private boost::noncopyable {}; + /** \brief Jack referencing an ActiveInput + \see \ref ppi_jacks */ class GenericActiveInputJack : public Jack { public: explicit GenericActiveInputJack(GenericActiveInput & input); - GenericActiveInput & connector(); + GenericActiveInput & connector(); ///< Get referenced connector private: GenericActiveInput & input_; }; + /** \brief Jack referencing an ActiveOutput + \see \ref ppi_jacks */ class GenericActiveOutputJack : public Jack { public: explicit GenericActiveOutputJack(GenericActiveOutput & output); - GenericActiveOutput & connector(); + GenericActiveOutput & connector(); ///< Get referenced connector private: GenericActiveOutput & output_; }; + /** \brief Jack referencing a PassiveInput + \see \ref ppi_jacks */ class GenericPassiveInputJack : public Jack { public: explicit GenericPassiveInputJack(GenericPassiveInput & input); - GenericPassiveInput & connector(); + GenericPassiveInput & connector(); ///< Get referenced connector private: GenericPassiveInput & input_; }; + /** \brief Jack referencing a PassiveOutput + \see \ref ppi_jacks */ class GenericPassiveOutputJack : public Jack { public: explicit GenericPassiveOutputJack(GenericPassiveOutput & output); - GenericPassiveOutput & connector(); + GenericPassiveOutput & connector(); ///< Get referenced connector private: GenericPassiveOutput & output_; }; + /** \brief Jack with packet type referencing an ActiveInput + \see \ref ppi_jacks */ template class ActiveInputJack : public GenericActiveInputJack @@ -115,6 +127,8 @@ namespace connector { #endif + /** \brief Jack with packet type referencing an ActiveOutput + \see \ref ppi_jacks */ template class ActiveOutputJack : public GenericActiveOutputJack @@ -140,6 +154,8 @@ namespace connector { #endif + /** \brief Jack with packet type referencing a PassiveInput + \see \ref ppi_jacks */ template class PassiveInputJack : public GenericPassiveInputJack @@ -165,6 +181,8 @@ namespace connector { #endif + /** \brief Jack with packet type referencing a PassiveOutput + \see \ref ppi_jacks */ template class PassiveOutputJack : public GenericPassiveOutputJack diff --git a/Utils/Logger/FileTarget.cc b/Utils/Logger/FileTarget.cc index 4cc69ad..c5aaa03 100644 --- a/Utils/Logger/FileTarget.cc +++ b/Utils/Logger/FileTarget.cc @@ -83,6 +83,12 @@ prefix_ void senf::log::FileTarget::reopen(std::string const & file) parent->add(file, consoleDir().node().unlink()); } +prefix_ std::string const & senf::log::FileTarget::filename() + const +{ + return file_; +} + prefix_ senf::log::FileTarget::RegisterConsole::RegisterConsole() { namespace kw = senf::console::kw; diff --git a/senf.dict b/senf.dict index 1a0c989..dfac3bf 100644 --- a/senf.dict +++ b/senf.dict @@ -646,6 +646,7 @@ TunTapSocketHandle txpower TypeA TypeB +TypedInterfaceDecorator typeField UDLR udp