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 SETELH 00018 #define SETELH 00019 00020 #include <string> 00021 00022 class IDNode; 00023 00029 class SetElement { 00030 00031 private: 00032 const int n; 00033 std::string *val; 00034 00035 public: 00036 /* ----------------------------- methods -------------------------------*/ 00037 00038 SetElement(int n=0, char **val=NULL); 00039 SetElement(int n, IDNode **val); 00040 ~SetElement(); 00041 00042 bool operator()(const SetElement& el1, const SetElement& el2) const; 00043 00044 std::string getVal() const { 00045 return val[0]; 00046 } 00047 00048 std::string toString() const; 00049 00050 }; 00051 00052 #endif