00001 /*========================================================================= 00002 00003 Program: bbtk 00004 Module: $RCSfile: bbs2cpp.cxx,v $ 00005 Language: C++ 00006 Date: $Date: 2008/10/14 14:20:24 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00010 l'Image). All rights reserved. See Doc/License.txt or 00011 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. 00012 00013 This software is distributed WITHOUT ANY WARRANTY; without even 00014 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 PURPOSE. See the above copyright notices for more information. 00016 00017 =========================================================================*/ 00018 00019 00020 #include "bbtkInterpreter.h" 00021 #include "bbtkUtilities.h" 00022 00023 int main(int argc, char* argv[]) 00024 { 00025 if (argc<2) return 1; 00026 00027 std::string file,path; 00028 file = bbtk::Utilities::ExtractScriptName(argv[1],path); 00029 file += ".h"; 00030 bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(file); 00031 00032 I->SetThrow(true); 00033 00034 try 00035 { 00036 I->InterpretFile(argv[1]); 00037 } 00038 catch (bbtk::Exception e) 00039 { 00040 e.Print(); 00041 } 00042 00043 return 0; 00044 } 00045 00046 // EOF 00047