From: Adam Dickmeiss Date: Sun, 11 Dec 2005 17:20:18 +0000 (+0000) Subject: Simplify template filter a bit and annotate a little X-Git-Tag: YP2.0.0.2~127 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=0d7d33a12b14cb26fdb922f42bb84dff33354ce7;p=metaproxy-moved-to-github.git Simplify template filter a bit and annotate a little --- diff --git a/src/filter_template.cpp b/src/filter_template.cpp index 1c3bf86..4d47dab 100644 --- a/src/filter_template.cpp +++ b/src/filter_template.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_template.cpp,v 1.1 2005-11-14 23:35:22 adam Exp $ +/* $Id: filter_template.cpp,v 1.2 2005-12-11 17:20:18 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -28,14 +28,13 @@ namespace yp2 { } } -using namespace yp2; - yf::Template::Template() : m_p(new Rep) { + m_p->dummy = 1; } yf::Template::~Template() -{ +{ // must have a destructor because of boost::scoped_ptr } void yf::Template::process(Package &package) const diff --git a/src/filter_template.hpp b/src/filter_template.hpp index ac44a95..5fcbcfd 100644 --- a/src/filter_template.hpp +++ b/src/filter_template.hpp @@ -1,9 +1,10 @@ -/* $Id: filter_template.hpp,v 1.1 2005-11-14 23:35:22 adam Exp $ +/* $Id: filter_template.hpp,v 1.2 2005-12-11 17:20:18 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% */ +// Filter that does nothing. Use as template for new filters #ifndef FILTER_TEMPLATE_HPP #define FILTER_TEMPLATE_HPP @@ -15,12 +16,11 @@ namespace yp2 { namespace filter { class Template : public Base { class Rep; + boost::scoped_ptr m_p; public: - ~Template(); Template(); + ~Template(); void process(yp2::Package & package) const; - private: - boost::scoped_ptr m_p; }; } }