|
dlvhex
2.1.0
|
00001 /* dlvhex -- Answer-Set Programming with external interfaces. 00002 * Copyright (C) 2005, 2006, 2007 Roman Schindlauer 00003 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Thomas Krennwallner 00004 * Copyright (C) 2009, 2010 Peter Schüller 00005 * 00006 * This file is part of dlvhex. 00007 * 00008 * dlvhex is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU Lesser General Public License as 00010 * published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * dlvhex is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with dlvhex; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA. 00022 */ 00023 00031 #ifndef HEXPARSER_HPP_INCLUDED__14102010 00032 #define HEXPARSER_HPP_INCLUDED__14102010 00033 00034 #include "dlvhex2/PlatformDefinitions.h" 00035 #include "dlvhex2/fwd.h" 00036 #include "dlvhex2/Error.h" 00037 00038 #include <vector> 00039 #include <iosfwd> 00040 00041 DLVHEX_NAMESPACE_BEGIN 00042 00043 class DLVHEX_EXPORT HexParser 00044 { 00045 public: 00046 virtual ~HexParser(); 00047 virtual void parse(InputProviderPtr in, ProgramCtx& out) = 0; 00048 }; 00049 typedef boost::shared_ptr<HexParser> HexParserPtr; 00050 00054 class DLVHEX_EXPORT ModuleHexParser: 00055 public HexParser 00056 { 00057 public: 00058 virtual void registerModule(HexParserModulePtr module); 00059 00060 public: 00061 virtual void parse(InputProviderPtr in, ProgramCtx& out); 00062 00063 protected: 00064 std::vector<HexParserModulePtr> modules; 00065 }; 00066 typedef boost::shared_ptr<ModuleHexParser> ModuleHexParserPtr; 00067 00068 DLVHEX_NAMESPACE_END 00069 00070 #endif // HEXPARSER_HPP_INCLUDED__14102010 00071 00072 // Local Variables: 00073 // mode: C++ 00074 // End: