1 /* $Id: filter_template.cpp,v 1.12 2008-02-20 15:07:52 adam Exp $
2 Copyright (c) 2005-2007, Index Data.
4 This file is part of Metaproxy.
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 /* $Id: filter_template.cpp,v 1.12 2008-02-20 15:07:52 adam Exp $
22 Copyright (c) 2005-2007, Index Data.
24 See the LICENSE file for details
29 #include "filter_template.hpp"
30 #include "package.hpp"
33 #include <boost/thread/mutex.hpp>
37 namespace mp = metaproxy_1;
38 namespace yf = mp::filter;
40 namespace metaproxy_1 {
42 class Template::Impl {
46 void process(metaproxy_1::Package & package) const;
47 void configure(const xmlNode * ptr);
54 // define Pimpl wrapper forwarding to Impl
56 yf::Template::Template() : m_p(new Impl)
60 yf::Template::~Template()
61 { // must have a destructor because of boost::scoped_ptr
64 void yf::Template::configure(const xmlNode *xmlnode, bool test_only)
66 m_p->configure(xmlnode);
69 void yf::Template::process(mp::Package &package) const
71 m_p->process(package);
75 // define Implementation stuff
79 yf::Template::Impl::Impl()
84 yf::Template::Impl::~Impl()
88 void yf::Template::Impl::configure(const xmlNode *xmlnode)
92 void yf::Template::Impl::process(mp::Package &package) const
94 // Z_GDU *gdu = package.request().get();
99 static mp::filter::Base* filter_creator()
101 return new mp::filter::Template;
105 struct metaproxy_1_filter_struct metaproxy_1_filter_template = {
116 * indent-tabs-mode: nil
117 * c-file-style: "stroustrup"
119 * vim: shiftwidth=4 tabstop=8 expandtab