1 /* 2 * ASAvidaNativeObjects.h 3 * Avida 4 * 5 * Created by David Bryson on 10/21/08. 6 * Copyright 2008-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 ASAvidaNativeObjects_h 23 #define ASAvidaNativeObjects_h 24 25 #include "AvidaScript.h" 26 27 #define AS_DECLARE_NATIVE_OBJECT(NAME, CLASS) \ 28 class CLASS; \ 29 namespace AvidaScript { template<> inline sASTypeInfo TypeOf<CLASS*>() { return sASTypeInfo(AS_TYPE_OBJECT_REF, NAME); } } 30 31 AS_DECLARE_NATIVE_OBJECT("Config", cAvidaConfig); 32 AS_DECLARE_NATIVE_OBJECT("Driver", cDefaultRunDriver); 33 AS_DECLARE_NATIVE_OBJECT("Genotype", cAnalyzeGenotype); 34 AS_DECLARE_NATIVE_OBJECT("GenotypeBatch", cGenotypeBatch); 35 AS_DECLARE_NATIVE_OBJECT("ResourceHistory", cResourceHistory); 36 AS_DECLARE_NATIVE_OBJECT("World", cWorld); 37 38 #undef AS_DECLARE_NATIVE_OBJECT 39 40 #endif 41