X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=2147d0ca35c1b84760ca57380c523ad77b85b89a;hb=372f03317f05d4a436b0f9c39b98558ec4810b78;hp=468d41f0ab5909c6ed739b9ecc10fb20cefd1e38;hpb=9a547ce682c6ca6a25a2e937c3e5bbe9b2aae3d6;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 468d41f..2147d0c 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ $ Language: C++ - Date: $Date: 2008/03/17 07:04:08 $ - Version: $Revision: 1.45 $ + Date: $Date: 2008/03/18 12:51:26 $ + Version: $Revision: 1.46 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -388,6 +388,97 @@ bufferNb =0; //======================================================================= + //======================================================================= + /** + * + */ + void Interpreter::InterpretBuffer( std::stringstream* buffer ) + { + bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretBuffer()"<::iterator it =mFileName.begin(); it!=mFileName.end(); ++it) + { + std::cout << "A=== [" << (*it) << "]" << std::endl; + } +*/ + bool insideComment = false; // for multiline comment + while (mFile.size()>0) + { +/* + for( std::vector::iterator it =mFileName.begin(); it!=mFileName.end(); ++it) + { + std::cout << "B=== [" << (*it) << "]" << std::endl; + } +*/ + + //while ((mFile.size()>0) && !mFile.back()->eof() ) + //{ +// std::cout << "mFile.size() "<< mFile.size() << " mFileName.back() [" << mFileName.back() << "]" << std::endl; + while (!mFile.back()->eof()) { + mLine.back()++; + char buf[500]; + mFile.back()->getline(buf,500); + std::string str(buf); +// std::cout << " in InterpretFile mFile.back()->getline [" << str << "]" << std::endl; + int size=str.length(); + if ( str[ size-1 ]==13 ) + { + str.erase(size-1,1); + } + + InterpretLine(str, insideComment); + + }//while + //if (mFile.size()>0) + CloseCurrentFile(); + } + } + catch (QuitException e) + { + // std::cout << "**QuitException caught**"<