1 /* 2 * cInstLibEntry.h 3 * Avida 4 * 5 * Created by David Bryson on 2/14/07. 6 * Copyright 2007-2011 Michigan State University. All rights reserved. 7 * 8 * 9 * This file is part of Avida. 10 * 11 * Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License 12 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 13 * 14 * Avida is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License along with Avida. 18 * If not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #ifndef tInstLibEntry_h 23 #define tInstLibEntry_h 24 25 #ifndef cInstLibEntry_h 26 #include "cInstLibEntry.h" 27 #endif 28 29 30 template <class FUN> class tInstLibEntry : public cInstLibEntry 31 { 32 private: 33 const FUN m_function; 34 35 tInstLibEntry(); // @not_implemented 36 37 public: 38 tInstLibEntry(const cString& name, FUN function, unsigned int flags = 0, const cString& desc = "") cInstLibEntry(name,flags,desc)39 : cInstLibEntry(name, flags, desc), m_function(function) { ; } 40 GetFunction()41 const FUN GetFunction() const { return m_function; } 42 }; 43 44 45 #endif 46