GeoGen Development snapshot a3

ggen_squirrel.h

00001 /*
00002 
00003     This file is part of GeoGen.
00004 
00005     GeoGen is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     GeoGen is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with GeoGen.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018 */
00019 
00020 #pragma once
00021 
00022 #include <list>
00023 
00024 #include "../external/squirrel/sqplus.h"
00025 #include "../external/squirrel/sqstdmath.h"
00026 #include "../external/squirrel/sqstdio.h"
00027 #include "../external/squirrel/sqstdmath.h"
00028 #include "../external/squirrel/sqstdstring.h"
00029 #include "../external/squirrel/sqstdaux.h"
00030 #include "../external/squirrel/sqstdblob.h"
00031 #include "../external/squirrel/sqstdsystem.h"
00032 
00033 #include "ggen_support.h"
00034 #include "ggen.h"
00035 
00036 using namespace SqPlus;
00037 
00038 #define SQ_REL_PATH "../external/squirrel_lib/"
00039 
00040 #ifdef UNICODE
00041 #define LIB  "U.lib"
00042 #else
00043 #define LIB  ".lib"
00044 #endif
00045 
00046 #ifdef _MSC_VER
00047 #ifdef _DEBUG
00048 #pragma comment(lib,SQ_REL_PATH "squirrelD" LIB)
00049 #pragma comment(lib,SQ_REL_PATH "sqstdlibD" LIB)
00050 #ifdef USE_REMOTE_DEBUGGER
00051 #pragma comment(lib,SQ_REL_PATH "sqdbglibD" LIB)
00052 #endif
00053 #pragma comment(lib,SQ_REL_PATH "sqplusD" LIB)
00054 #else // Release
00055 #pragma comment(lib,SQ_REL_PATH "squirrel" LIB)
00056 #pragma comment(lib,SQ_REL_PATH "sqstdlib" LIB)
00057 #ifdef USE_REMOTE_DEBUGGER
00058 #pragma comment(lib,SQ_REL_PATH "sqdbglib" LIB)
00059 #endif
00060 #pragma comment(lib,SQ_REL_PATH "sqplus" LIB)
00061 #endif
00062 #endif
00063 
00064 DECLARE_INSTANCE_TYPE(GGen_Data_1D)
00065 DECLARE_INSTANCE_TYPE(GGen_Data_2D)
00066 DECLARE_INSTANCE_TYPE(GGen_Amplitudes)
00067 DECLARE_INSTANCE_TYPE(GGen_Point)
00068 DECLARE_INSTANCE_TYPE(GGen_Path)
00069 
00070 class GGEN_EXPORT GGen_Squirrel: public GGen{
00071 protected:
00072           list<void*> presets;
00073 public:   
00074           GGen_Squirrel();
00075           virtual ~GGen_Squirrel();
00076 
00077           virtual bool SetScript(const GGen_String& script);
00078           virtual GGen_String GetInfo(const GGen_String& label);
00079           virtual int GetInfoInt(const GGen_String& label);
00080           virtual int16* Generate();
00081           
00082           virtual void RegisterPreset(GGen_Data_1D* preset, const GGen_String& label);
00083           virtual void RegisterPreset(GGen_Data_2D* preset, const GGen_String& label);
00084           virtual void RegisterPreset(GGen_Amplitudes* preset, const GGen_String& label);
00085 };
00086