[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/xml/scene_parser.cpp
From: |
David Lau |
Subject: |
[Usata-commits] Changes to usata2/src/xml/scene_parser.cpp |
Date: |
Wed, 23 Feb 2005 11:55:47 -0500 |
Index: usata2/src/xml/scene_parser.cpp
diff -u usata2/src/xml/scene_parser.cpp:1.3 usata2/src/xml/scene_parser.cpp:1.4
--- usata2/src/xml/scene_parser.cpp:1.3 Tue Feb 22 18:17:57 2005
+++ usata2/src/xml/scene_parser.cpp Wed Feb 23 16:55:46 2005
@@ -10,10 +10,9 @@
// included in the software distribution, or visit
// http://www.fsf.org/licenses/gpl.html.
//
-// $Id: scene_parser.cpp,v 1.3 2005/02/22 18:17:57 skunix Exp $
+// $Id: scene_parser.cpp,v 1.4 2005/02/23 16:55:46 skunix Exp $
#include <map>
-#include <iostream>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
@@ -43,7 +42,7 @@
: mIs(stream),
mStreamName(stream_name)
{
-
+ mOk=true;
}
void
@@ -57,7 +56,7 @@
{
boost::mutex::scoped_lock p(mObjectQueue_M);
mObjectQueue.push(aNewOD);
- std::cout << "ready with object of type " << aNewOD->type << std::endl;;
+// std::cout << "ready with object of type " << aNewOD->type << std::endl;;
return;
}
@@ -105,7 +104,7 @@
using namespace scene_parser_elements;
//create an ignore element
ne = new IgnoreE(te, this);
- std::cout << "ignore '"<<name<<"'" << std::endl;
+ //std::cout << "ignore '"<<name<<"'" << std::endl;
}
mElements.push(ne);
@@ -150,13 +149,17 @@
if (!parse_chunkb(readlen, done))
{
- std::cout << get_error() << std::endl;
- return;
+ log::BufferedStream ls(log::Level::ERROR);
+ ls << get_error() << log::commit;
+ mOk=false;
+
+ break;
}
if (mThreadAbort)
return;
}
+ mFinished=true;
return;
}
@@ -170,6 +173,7 @@
SceneParser::threaded_parse()
{
mThreadAbort=false;
+ mFinished=false;
mThread.reset(
new boost::thread(
boost::bind(&SceneParser::thread_main,this)