From: g0dil Date: Tue, 30 Jun 2009 12:08:55 +0000 (+0000) Subject: PPI: Typo fixes and unit test update for MultiConnectorMixin X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=484a803b5daf079d7eef582d53e7ab10ff7107f8;p=senf.git PPI: Typo fixes and unit test update for MultiConnectorMixin git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1251 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/MultiConnectorMixin.hh b/PPI/MultiConnectorMixin.hh index a04be33..b386e01 100644 --- a/PPI/MultiConnectorMixin.hh +++ b/PPI/MultiConnectorMixin.hh @@ -192,7 +192,7 @@ namespace module { non-const reference and wrap the real argument using \c boost::ref() (The reason for this is known as 'The forwarding problem' - \section Advanced usage: Managing your own container + \section senf_ppi_multiconnector_advanced Advanced usage: Managing your own container If you need to use a completely different type of container, you can take over the container management yourself. To do this, pass \c void as container type and change \c @@ -200,7 +200,7 @@ namespace module { save this connector in some container or throw an exception \code class MyModule - : public senf::ppi::module::Modulem, + : public senf::ppi::module::Module, public senf::ppi::module::MultiConnectorMixin< MyModule, senf::ppi::connector::ActiveInput<>, void, void > { diff --git a/PPI/MultiConnectorMixin.test.cc b/PPI/MultiConnectorMixin.test.cc index bb81a69..6e05ebe 100644 --- a/PPI/MultiConnectorMixin.test.cc +++ b/PPI/MultiConnectorMixin.test.cc @@ -60,7 +60,7 @@ namespace { void connectorSetup(std::auto_ptr c) { route(input, *c); - connectors_.push_back(c); + connectors_.push_back(boost::shared_ptr(c)); } void request() @@ -68,10 +68,10 @@ namespace { senf::Packet p (input()); for (Connectors::iterator i (connectors_.begin()), i_end (connectors_.end()); i != i_end; ++i) - (*i)(p); + (**i)(p); } - typedef boost::ptr_vector Connectors; + typedef std::vector< boost::shared_ptr > Connectors; Connectors connectors_; friend class senf::ppi::module::MultiConnectorMixin