Wexus2 0.20
|
00001 00002 /* 00003 * Copyright (c) 2011 Aleksander B. Demko 00004 * This source code is distributed under the MIT license. 00005 * See the accompanying file LICENSE.MIT.txt for details. 00006 */ 00007 00008 #ifndef __INCLUDED_WEXUS_TEMPLATEPARSER_H__ 00009 #define __INCLUDED_WEXUS_TEMPLATEPARSER_H__ 00010 00011 #include <QString> 00012 #include <QIODevice> 00013 00014 #include <wexus/TemplateTokenList.h> 00015 #include <wexus/Exception.h> 00016 00017 namespace wexus 00018 { 00019 class TemplateParser; 00020 } 00021 00022 class wexus::TemplateParser 00023 { 00024 public: 00025 class Exception : public wexus::Exception 00026 { 00027 public: 00028 /// usermessage constructor 00029 Exception(const QString &_what) throw(); 00030 }; 00031 00032 public: 00033 virtual ~TemplateParser(); 00034 /** 00035 * Parses the given input stream and append found TemplateTokens 00036 * to the TemplateTokenList 00037 * 00038 * @author Aleksander Demko 00039 */ 00040 virtual void parse(QIODevice &input, wexus::TemplateTokenList &outlist) = 0; 00041 }; 00042 00043 #endif