1 #ifndef _CLOSURECACHE_H_INCLUDED_ 2 #define _CLOSURECACHE_H_INCLUDED_ 3 /////////////////////////////////////////////////////////////////////////////// 4 // 5 // ClosureCache.h 6 // ------------- 7 // Dragon closure hash interface defintion 8 // 9 // Design and Implementation by Bjoern Lemke 10 // 11 // (C)opyright 2000-2007 Bjoern Lemke 12 // 13 // This program is free software; you can redistribute it and/or modify 14 // it under the terms of the GNU General Public License as published by 15 // the Free Software Foundation; either version 2, or (at your option) 16 // any later version. 17 // 18 // This program is distributed in the hope that it will be useful, 19 // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 // GNU General Public License for more details. 22 // 23 // You should have received a copy of the GNU General Public License 24 // along with this program; see the file COPYING. If not, write to 25 // the Free Software Foundation, 59 Temple Place - Suite 330, 26 // Boston, MA 02111-1307, USA. 27 // 28 // INTERFACE MODULE 29 // 30 // Class: ClosureHash 31 // 32 // Description: 33 // 34 /////////////////////////////////////////////////////////////////////////////// 35 36 #include <lfcbase/Chain.h> 37 #include <lfcbase/SetT.h> 38 39 #include "LR1Element.h" 40 41 42 class ClosureCache { 43 public: 44 45 ClosureCache(); 46 47 ClosureCache(const LR1Element& e); 48 ClosureCache(const SetT<LR1Element>& closureSet, const LR1Element& e); 49 ~ClosureCache(); 50 51 SetT<LR1Element>& getClosure() const; 52 53 ClosureCache& operator = (const ClosureCache& cc); 54 55 bool operator == (const ClosureCache& cc) const; 56 57 private: 58 59 LR1Element _e; 60 SetT<LR1Element> _closureSet; 61 62 }; 63 64 #endif 65 66 67 68 69 70