-/* $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
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()
-/* $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
namespace mp = metaproxy_1;
mp::Package::Package()
- : m_route_pos(0), m_data(0)
+ : m_route_pos(0)
{
}
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)
{
}
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;
-/* $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
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
RoutePos *m_route_pos;
- int m_data;
+ //int m_data;
yazpp_1::GDU m_request_gdu;
yazpp_1::GDU m_response_gdu;
-/* $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
public:
FilterConstant() : m_constant(1234) { };
void process(mp::Package & package) const {
- package.data() = m_constant;
package.move();
};
void configure(const xmlNode* ptr = 0);
class FilterDouble: public mp::filter::Base {
public:
void process(mp::Package & package) const {
- package.data() = package.data() * 2;
package.move();
};
};
pack.router(router1).move();
- BOOST_CHECK_EQUAL(pack.data(), 2468);
+ //BOOST_CHECK_EQUAL(pack.data(), 2468);
}
pack.router(router2).move();
- BOOST_CHECK_EQUAL(pack.data(), 1234);
+ //BOOST_CHECK_EQUAL(pack.data(), 1234);
}
-/* $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
void XFilter::process(mp::Package & package) const
{
- package.data() = 1;
+ //package.data() = 1;
}
static mp::filter::Base* xfilter_creator(){
void YFilter::process(mp::Package & package) const
{
- package.data() = 2;
+ //package.data() = 2;
}
static mp::filter::Base* yfilter_creator(){
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;
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;