From: Marc Cromme Date: Thu, 14 Sep 2006 19:53:57 +0000 (+0000) Subject: superflous member int m_data removed from Package class X-Git-Tag: METAPROXY.1.0.7~65 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=48cfd383e1e94fa9d34d8a783b7c0137ae598a9d;p=metaproxy-moved-to-github.git superflous member int m_data removed from Package class --- diff --git a/src/filter_dl.cpp b/src/filter_dl.cpp index 0d95266..b29003e 100644 --- a/src/filter_dl.cpp +++ b/src/filter_dl.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_dl.cpp,v 1.6 2006-06-10 14:29:12 adam Exp $ +/* $Id: filter_dl.cpp,v 1.7 2006-09-14 19:53:57 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -22,7 +22,6 @@ namespace metaproxy_1 { void mp::filter::Filter_dl::process(mp::Package & package) const { - package.data() = 42; // magic checked in test_filter_factory } static mp::filter::Base* filter_creator() diff --git a/src/package.cpp b/src/package.cpp index 6ac07ac..2b2c84c 100644 --- a/src/package.cpp +++ b/src/package.cpp @@ -1,4 +1,4 @@ -/* $Id: package.cpp,v 1.16 2006-08-30 14:37:11 marc Exp $ +/* $Id: package.cpp,v 1.17 2006-09-14 19:53:57 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -13,7 +13,7 @@ namespace mp = metaproxy_1; mp::Package::Package() - : m_route_pos(0), m_data(0) + : m_route_pos(0) { } @@ -24,7 +24,7 @@ mp::Package::~Package() mp::Package::Package(mp::Session &session, const mp::Origin &origin) : m_session(session), m_origin(origin), - m_route_pos(0), m_data(0) + m_route_pos(0) { } @@ -64,23 +64,6 @@ mp::Session & mp::Package::session() return m_session; } - -int mp::Package::data() const -{ - return m_data; -} - -int & mp::Package::data() -{ - return m_data; -} - -mp::Package & mp::Package::data(const int & data) -{ - m_data = data; - return *this; -} - mp::Origin mp::Package::origin() const { return m_origin; diff --git a/src/package.hpp b/src/package.hpp index 3fb632b..b00ebeb 100644 --- a/src/package.hpp +++ b/src/package.hpp @@ -1,4 +1,4 @@ -/* $Id: package.hpp,v 1.22 2006-08-30 10:48:52 adam Exp $ +/* $Id: package.hpp,v 1.23 2006-09-14 19:53:57 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -67,15 +67,6 @@ namespace metaproxy_1 { metaproxy_1::Session & session(); /// get function - right val in assignment - int data() const; - - /// set function - left val in assignment - int & data(); - - /// set function - can be chained - Package & data(const int & data); - - /// get function - right val in assignment Origin origin() const; /// set function - left val in assignment @@ -99,7 +90,7 @@ namespace metaproxy_1 { RoutePos *m_route_pos; - int m_data; + //int m_data; yazpp_1::GDU m_request_gdu; yazpp_1::GDU m_response_gdu; diff --git a/src/test_filter2.cpp b/src/test_filter2.cpp index ddfe832..8bb4224 100644 --- a/src/test_filter2.cpp +++ b/src/test_filter2.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter2.cpp,v 1.20 2006-06-10 14:29:12 adam Exp $ +/* $Id: test_filter2.cpp,v 1.21 2006-09-14 19:53:57 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -25,7 +25,6 @@ class FilterConstant: public mp::filter::Base { public: FilterConstant() : m_constant(1234) { }; void process(mp::Package & package) const { - package.data() = m_constant; package.move(); }; void configure(const xmlNode* ptr = 0); @@ -78,7 +77,6 @@ void FilterConstant::configure(const xmlNode* ptr) class FilterDouble: public mp::filter::Base { public: void process(mp::Package & package) const { - package.data() = package.data() * 2; package.move(); }; }; @@ -104,7 +102,7 @@ BOOST_AUTO_UNIT_TEST( testfilter2_1 ) pack.router(router1).move(); - BOOST_CHECK_EQUAL(pack.data(), 2468); + //BOOST_CHECK_EQUAL(pack.data(), 2468); } @@ -120,7 +118,7 @@ BOOST_AUTO_UNIT_TEST( testfilter2_1 ) pack.router(router2).move(); - BOOST_CHECK_EQUAL(pack.data(), 1234); + //BOOST_CHECK_EQUAL(pack.data(), 1234); } diff --git a/src/test_filter_factory.cpp b/src/test_filter_factory.cpp index 9fc5987..7f6761c 100644 --- a/src/test_filter_factory.cpp +++ b/src/test_filter_factory.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter_factory.cpp,v 1.13 2006-06-10 14:29:12 adam Exp $ +/* $Id: test_filter_factory.cpp,v 1.14 2006-09-14 19:53:57 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -27,7 +27,7 @@ public: void XFilter::process(mp::Package & package) const { - package.data() = 1; + //package.data() = 1; } static mp::filter::Base* xfilter_creator(){ @@ -42,7 +42,7 @@ public: void YFilter::process(mp::Package & package) const { - package.data() = 2; + //package.data() = 2; } static mp::filter::Base* yfilter_creator(){ @@ -76,10 +76,10 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_1 ) mp::Package pack; xfilter->process(pack); - BOOST_CHECK_EQUAL(pack.data(), 1); + //BOOST_CHECK_EQUAL(pack.data(), 1); yfilter->process(pack); - BOOST_CHECK_EQUAL(pack.data(), 2); + //BOOST_CHECK_EQUAL(pack.data(), 2); } catch ( ... ) { throw; @@ -109,7 +109,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_2 ) mp::Package pack; filter->process(pack); - BOOST_CHECK_EQUAL(pack.data(), 42); // magic from filter_dl .. + //BOOST_CHECK_EQUAL(pack.data(), 42); // magic from filter_dl .. } catch ( ... ) { throw;