X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ffilter.hpp;h=b71e85f77123a7f40d0c18f2b400a29dd069dfd2;hb=7467b072bb64f5c8575daa9917cce7df62d832f1;hp=73bf2ca1aa4a6152d8a53a0a8c8aaa4a19aef295;hpb=b84218609efb976d5b5270bd9e95a3c421af3a13;p=metaproxy-moved-to-github.git diff --git a/src/filter.hpp b/src/filter.hpp index 73bf2ca..b71e85f 100644 --- a/src/filter.hpp +++ b/src/filter.hpp @@ -1,8 +1,14 @@ +/* $Id: filter.hpp,v 1.7 2005-10-29 22:23:36 marc Exp $ + Copyright (c) 2005, Index Data. + +%LICENSE% + */ #ifndef FILTER_HPP #define FILTER_HPP #include +#include namespace yp2 { @@ -14,28 +20,12 @@ namespace yp2 { virtual ~Base(){}; ///sends Package off to next Filter, returns altered Package - virtual void process(Package & package) const { - }; - virtual void configure(){}; - - /// get function - right val in assignment - std::string name() const { - return m_name; - } - - /// set function - left val in assignment - std::string & name() { - return m_name; - } + virtual void process(Package & package) const = 0; + + virtual void configure(const xmlNode * ptr = 0) { }; - /// set function - can be chained - Base & name(const std::string & name){ - m_name = name; - return *this; - } - private: - std::string m_name; + virtual const std::string type() const = 0; }; } @@ -54,6 +44,7 @@ namespace yp2 { * Local variables: * c-basic-offset: 4 * indent-tabs-mode: nil + * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */