From: tho Date: Wed, 11 Aug 2010 10:51:51 +0000 (+0000) Subject: PPI: bugfix for FIFOQueueingAlgorithm X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=170ae4cd10f61d5159bac4621504484fd7cbd1ce;p=senf.git PPI: bugfix for FIFOQueueingAlgorithm Utils: added documentation for senf::str() git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1671 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/Connectors.cc b/senf/PPI/Connectors.cc index eca5ecc..2a876b6 100644 --- a/senf/PPI/Connectors.cc +++ b/senf/PPI/Connectors.cc @@ -208,6 +208,12 @@ prefix_ void senf::ppi::connector::Connector::v_disconnected() /////////////////////////////////////////////////////////////////////////// // senf::ppi::connector::PassiveConnector +prefix_ senf::ppi::connector::PassiveConnector::~PassiveConnector() +{ + // Must be here and NOT in base so it is called before destructing the routes_ member + unregisterConnector(); +} + //////////////////////////////////////// // private members @@ -255,6 +261,12 @@ prefix_ void senf::ppi::connector::PassiveConnector::notifyUnthrottle() /////////////////////////////////////////////////////////////////////////// // senf::ppi::connector::ActiveConnector +prefix_ senf::ppi::connector::ActiveConnector::~ActiveConnector() +{ + // Must be here and NOT in base so it is called before destructing the routes_ member + unregisterConnector(); +} + //////////////////////////////////////// // private members diff --git a/senf/PPI/Connectors.ct b/senf/PPI/Connectors.ct index 8868e9c..ee9d903 100644 --- a/senf/PPI/Connectors.ct +++ b/senf/PPI/Connectors.ct @@ -33,12 +33,6 @@ /////////////////////////////////////////////////////////////////////////// // senf::ppi::connector::PassiveConnector -prefix_ senf::ppi::connector::PassiveConnector::~PassiveConnector() -{ - // Must be here and NOT in base so it is called before destructing the routes_ member - unregisterConnector(); -} - template prefix_ void senf::ppi::connector::PassiveConnector::onRequest(Handler handler) { @@ -48,12 +42,6 @@ prefix_ void senf::ppi::connector::PassiveConnector::onRequest(Handler handler) /////////////////////////////////////////////////////////////////////////// // senf::ppi::connector::ActiveConnector -prefix_ senf::ppi::connector::ActiveConnector::~ActiveConnector() -{ - // Must be here and NOT in base so it is called before destructing the routes_ member - unregisterConnector(); -} - template prefix_ void senf::ppi::connector::ActiveConnector::onThrottle(Handler handler) { diff --git a/senf/PPI/QueueingSocketSink.cc b/senf/PPI/QueueingSocketSink.cc index c21eeb8..d01ee8b 100644 --- a/senf/PPI/QueueingSocketSink.cc +++ b/senf/PPI/QueueingSocketSink.cc @@ -83,7 +83,7 @@ prefix_ senf::ppi::FIFOQueueingAlgorithm::FIFOQueueingAlgorithm() prefix_ senf::Packet senf::ppi::FIFOQueueingAlgorithm::v_dequeue() { if (queue_.size() > 0) { - Packet const & p = queue_.front(); + Packet p (queue_.front()); queue_.pop(); return p; } diff --git a/senf/Scheduler/ClockService.hh b/senf/Scheduler/ClockService.hh index 59b3de0..cc859af 100644 --- a/senf/Scheduler/ClockService.hh +++ b/senf/Scheduler/ClockService.hh @@ -83,14 +83,14 @@ namespace senf { /** \brief Absolute time data type - Boost.DateTime + Boost.DateTime datatype used to represent absolute date/time values. */ typedef boost::posix_time::ptime abstime_type; /** \brief Relative time data type - Boost.DateTime + Boost.DateTime datatype used to represent time intervals */ typedef boost::posix_time::time_duration reltime_type; @@ -101,7 +101,7 @@ namespace senf { static abstime_type abstime(clock_type clock); ///< Convert clock to absolute time /**< This member converts a clock value into an absolute - Boost.DateTime + Boost.DateTime value. \note You should not base timeout calculations on this absolute time value. Clock time is guaranteed to be @@ -110,7 +110,7 @@ namespace senf { static reltime_type reltime(clock_type clock); ///< Convert clock to relative time /**< This member converts a clock value into a relative - Boost.DateTime + Boost.DateTime time interval \note The resolution of reltime_type might be smaller than the clock_type resolution */ diff --git a/senf/Utils/String.hh b/senf/Utils/String.hh index ed1e65b..5a0c8c0 100644 --- a/senf/Utils/String.hh +++ b/senf/Utils/String.hh @@ -42,6 +42,22 @@ namespace senf { template std::string stringJoin(ForwardReadableRange const & range, std::string sep); + /** \brief Get string representation + + Returns the result of streaming the argument into a standard library string-based + stream and then out as a std::string object. The conversion is done with + boost::lexical_cast. The call is equivalent to +
+            boost::lexical_cast(t);
+        
+ \pre + t must be OutputStreamable, + meaning that an operator\<\< is defined\n + t must be CopyConstructible + + \see + boost::lexical_cast + */ template std::string str(T const & t);