]> Creatis software - bbtk.git/blob - kernel/appli/bbs2cpp/bbs2cpp.cxx
8541b5ed1e854f75298e6d7b5dda0eac25de55ff
[bbtk.git] / kernel / appli / bbs2cpp / bbs2cpp.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbs2cpp.cxx,v $
5   Language:  C++
6   Date:      $Date: 2008/10/14 14:20:24 $
7   Version:   $Revision: 1.4 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19
20 #include "bbtkInterpreter.h"
21 #include "bbtkUtilities.h"
22
23 int main(int argc, char* argv[])
24 {  
25   if (argc<2) return 1;
26
27   std::string file,path;
28   file = bbtk::Utilities::ExtractScriptName(argv[1],path);
29   file += ".h";
30   bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(file);
31
32   I->SetThrow(true);
33
34   try
35     {
36       I->InterpretFile(argv[1]);
37     }
38   catch (bbtk::Exception e)
39     {
40       e.Print();
41     }
42
43   return 0;
44 }
45
46 // EOF
47