Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
XmlParserAbstraction.hpp
Go to the documentation of this file.
1
6#pragma once
7
10
12
13namespace abstraction {
14
15template < class ReturnType >
16class XmlParserAbstraction : virtual public NaryOperationAbstraction < ext::deque < sax::Token > && >, virtual public ValueOperationAbstraction < ReturnType > {
17public:
18 std::shared_ptr < abstraction::Value > run ( ) const override {
19 const std::shared_ptr < abstraction::Value > & param = std::get < 0 > ( this->getParams ( ) );
20 return std::make_shared < abstraction::ValueHolder < ReturnType > > ( factory::XmlDataFactory::fromTokens ( abstraction::retrieveValue < ext::deque < sax::Token > && > ( param ) ), true );
21 }
22
23};
24
25} /* namespace abstraction */
26
const ext::array< std::shared_ptr< abstraction::Value >, NumberOfParams > & getParams() const
Definition: NaryOperationAbstraction.hpp:21
Definition: NaryOperationAbstraction.hpp:77
Definition: ValueOperationAbstraction.hpp:19
Definition: XmlParserAbstraction.hpp:16
std::shared_ptr< abstraction::Value > run() const override
Definition: XmlParserAbstraction.hpp:18
Definition: XmlDataFactory.hpp:92
Definition: AlgorithmAbstraction.hpp:11
ParamType retrieveValue(const std::shared_ptr< abstraction::Value > &param, bool move=false)
Definition: ValueHolderInterface.hpp:26