00001 /* (c) 2008,2009 Jonathan Hogg and Andreas Grothey, University of Edinburgh 00002 * 00003 * This file is part of SML. 00004 * 00005 * SML is free software: you can redistribute it and/or modify it under the 00006 * terms of the GNU Lesser General Public License as published by the Free 00007 * Software Foundation, using version 3 of the License. 00008 * 00009 * SML is distributed in the hope that it will be useful, but WITHOUT ANY 00010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00012 * details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program. If not, see http://www.gnu.org/licenses/. 00016 */ 00017 #ifndef BACKEND_H 00018 #define BACKEND_H 00019 00020 #include <list> 00021 #include <vector> 00022 #include <string> 00023 00024 class AmplModel; 00025 class SyntaxNode; 00026 00027 /* this struct stores an indexing expression in an easy to modify form: 00028 the add_index below will be rendered as 00029 val(dummyVar) in val(set) 00030 or just 00031 val(set) 00032 if dummyVar is NULL 00033 */ 00034 00055 typedef struct { 00056 00058 SyntaxNode *dummyVar; 00059 00061 SyntaxNode *set; 00062 00063 } add_index; 00064 00065 /* some global variables that change the behaviour of some printing routines */ 00066 extern std::vector<std::list<add_index> > l_addIndex; 00067 00068 int process_model(AmplModel *model, const std::string& datafilename); 00069 00070 #endif