arabica/include/XSLT/impl/handler/xslt_with_param_handler.hpp

41 lines
1.1 KiB
C++
Raw Normal View History

2007-07-19 19:01:42 +02:00
#ifndef ARABICA_XSLT_WITH_PARAM_HANDLER_HPP
#define ARABICA_XSLT_WITH_PARAM_HANDLER_HPP
#include "../xslt_with_param.hpp"
#include "xslt_variable_handler.hpp"
namespace Arabica
{
namespace XSLT
{
2012-11-06 09:11:27 +01:00
template<class string_type, class string_adaptor>
class WithParamHandler : public VariableHandler<WithParam<string_type, string_adaptor> >
2007-07-19 19:01:42 +02:00
{
2012-11-06 09:11:27 +01:00
typedef VariableHandler<WithParam<string_type, string_adaptor> > baseT;
2007-07-19 19:01:42 +02:00
public:
2012-11-06 09:11:27 +01:00
WithParamHandler(CompilationContext<string_type, string_adaptor>& context,
WithParamable<string_type, string_adaptor>& paramee) :
baseT(context),
2007-07-19 19:01:42 +02:00
paramee_(paramee)
{
} // WithParamHandler
2012-11-06 09:11:27 +01:00
virtual void endElement(const string_type& /* namespaceURI */,
const string_type& /* localName */,
const string_type& /* qName */)
2007-07-19 19:01:42 +02:00
{
2012-11-06 09:11:27 +01:00
paramee_.add_with_param(baseT::container());
baseT::context().pop();
2007-07-19 19:01:42 +02:00
} // endElement
private:
2012-11-06 09:11:27 +01:00
WithParamable<string_type, string_adaptor>& paramee_;
2007-07-19 19:01:42 +02:00
}; // WithParamHandler
} // namespace XSLT
} // namespace Arabica
#endif