Commit 5104bf5c authored by Jan Möbius's avatar Jan Möbius
Browse files

Silence most readers/writers

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1053 fdac6126-5c0c-442c-9429-916003d36597
parent 0295f4a7
...@@ -265,8 +265,6 @@ bool ...@@ -265,8 +265,6 @@ bool
_OBJReader_:: _OBJReader_::
read(std::istream& _in, BaseImporter& _bi, Options& _opt) read(std::istream& _in, BaseImporter& _bi, Options& _opt)
{ {
omlog() << "[OBJReader] : read file\n";
std::string line; std::string line;
std::string keyWrd; std::string keyWrd;
...@@ -322,7 +320,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) ...@@ -322,7 +320,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt)
matFile = path_ + matFile; matFile = path_ + matFile;
omlog() << "Load material file " << matFile << std::endl; //omlog() << "Load material file " << matFile << std::endl;
std::fstream matStream( matFile.c_str(), std::ios_base::in ); std::fstream matStream( matFile.c_str(), std::ios_base::in );
...@@ -335,7 +333,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) ...@@ -335,7 +333,7 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt)
}else }else
omerr() << " Warning! Material file '" << matFile << "' not found!\n"; omerr() << " Warning! Material file '" << matFile << "' not found!\n";
omlog() << " " << materials_.size() << " materials loaded.\n"; //omlog() << " " << materials_.size() << " materials loaded.\n";
for ( MaterialList::iterator material = materials_.begin(); material != materials_.end(); ++material ) for ( MaterialList::iterator material = materials_.begin(); material != materials_.end(); ++material )
{ {
......
...@@ -176,8 +176,6 @@ _OFFReader_::read_ascii(std::istream& _in, BaseImporter& _bi, Options& _opt) con ...@@ -176,8 +176,6 @@ _OFFReader_::read_ascii(std::istream& _in, BaseImporter& _bi, Options& _opt) con
{ {
omlog() << "[OFFReader] : read ascii file\n";
unsigned int i, j, k, l, idx; unsigned int i, j, k, l, idx;
unsigned int nV, nF, dummy; unsigned int nV, nF, dummy;
OpenMesh::Vec3f v, n; OpenMesh::Vec3f v, n;
...@@ -433,8 +431,6 @@ void _OFFReader_::readValue(std::istream& _in, unsigned int& _value) const{ ...@@ -433,8 +431,6 @@ void _OFFReader_::readValue(std::istream& _in, unsigned int& _value) const{
bool bool
_OFFReader_::read_binary(std::istream& _in, BaseImporter& _bi, Options& _opt, bool /*_swap*/) const _OFFReader_::read_binary(std::istream& _in, BaseImporter& _bi, Options& _opt, bool /*_swap*/) const
{ {
omlog() << "[OFFReader] : read binary file\n";
unsigned int i, j, k, l, idx; unsigned int i, j, k, l, idx;
unsigned int nV, nF, dummy; unsigned int nV, nF, dummy;
OpenMesh::Vec3f v, n; OpenMesh::Vec3f v, n;
......
...@@ -171,8 +171,6 @@ bool _PLYReader_::read(std::istream& _in, BaseImporter& _bi, Options& _opt) { ...@@ -171,8 +171,6 @@ bool _PLYReader_::read(std::istream& _in, BaseImporter& _bi, Options& _opt) {
bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options& _opt) const { bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options& _opt) const {
omlog() << "[PLYReader] : read ascii file\n";
// Reparse the header // Reparse the header
if (!can_u_read(_in)) { if (!can_u_read(_in)) {
omerr() << "[PLYReader] : Unable to parse header\n"; omerr() << "[PLYReader] : Unable to parse header\n";
...@@ -322,8 +320,6 @@ bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options ...@@ -322,8 +320,6 @@ bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options
bool _PLYReader_::read_binary(std::istream& _in, BaseImporter& _bi, bool /*_swap*/, const Options& _opt) const { bool _PLYReader_::read_binary(std::istream& _in, BaseImporter& _bi, bool /*_swap*/, const Options& _opt) const {
omlog() << "[PLYReader] : read binary file format\n";
// Reparse the header // Reparse the header
if (!can_u_read(_in)) { if (!can_u_read(_in)) {
omerr() << "[PLYReader] : Unable to parse header\n"; omerr() << "[PLYReader] : Unable to parse header\n";
...@@ -859,8 +855,6 @@ bool _PLYReader_::can_u_read(std::istream& _is) const { ...@@ -859,8 +855,6 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
if (line != "PLY" && line != "ply") if (line != "PLY" && line != "ply")
return false; return false;
// omlog() << "PLY header found" << std::endl;
vertexCount_ = 0; vertexCount_ = 0;
faceCount_ = 0; faceCount_ = 0;
vertexDimension_ = 0; vertexDimension_ = 0;
...@@ -907,7 +901,6 @@ bool _PLYReader_::can_u_read(std::istream& _is) const { ...@@ -907,7 +901,6 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
if (keyword == "comment") { if (keyword == "comment") {
std::getline(_is, line); std::getline(_is, line);
omlog() << "PLY header comment : " << line << std::endl;
} else if (keyword == "element") { } else if (keyword == "element") {
_is >> elementName; _is >> elementName;
if (elementName == "vertex") { if (elementName == "vertex") {
......
...@@ -206,8 +206,6 @@ bool ...@@ -206,8 +206,6 @@ bool
_STLReader_:: _STLReader_::
read_stla(const std::string& _filename, BaseImporter& _bi, Options& _opt) const read_stla(const std::string& _filename, BaseImporter& _bi, Options& _opt) const
{ {
omlog() << "[STLReader] : read ascii file\n";
std::fstream in( _filename.c_str(), std::ios_base::in ); std::fstream in( _filename.c_str(), std::ios_base::in );
if (!in) if (!in)
...@@ -232,8 +230,6 @@ bool ...@@ -232,8 +230,6 @@ bool
_STLReader_:: _STLReader_::
read_stla(std::istream& _in, BaseImporter& _bi, Options& _opt) const read_stla(std::istream& _in, BaseImporter& _bi, Options& _opt) const
{ {
omlog() << "[STLReader] : read ascii stream\n";
unsigned int i; unsigned int i;
OpenMesh::Vec3f v; OpenMesh::Vec3f v;
...@@ -342,8 +338,6 @@ bool ...@@ -342,8 +338,6 @@ bool
_STLReader_:: _STLReader_::
read_stlb(const std::string& _filename, BaseImporter& _bi, Options& _opt) const read_stlb(const std::string& _filename, BaseImporter& _bi, Options& _opt) const
{ {
omlog() << "[STLReader] : read binary file\n";
std::fstream in( _filename.c_str(), std::ios_base::in | std::ios_base::binary); std::fstream in( _filename.c_str(), std::ios_base::in | std::ios_base::binary);
if (!in) if (!in)
...@@ -368,8 +362,6 @@ bool ...@@ -368,8 +362,6 @@ bool
_STLReader_:: _STLReader_::
read_stlb(std::istream& _in, BaseImporter& _bi, Options& _opt) const read_stlb(std::istream& _in, BaseImporter& _bi, Options& _opt) const
{ {
omlog() << "[STLReader] : read binary stream\n";
char dummy[100]; char dummy[100];
bool swapFlag; bool swapFlag;
unsigned int i, nT; unsigned int i, nT;
......
...@@ -175,8 +175,6 @@ bool ...@@ -175,8 +175,6 @@ bool
_OFFWriter_:: _OFFWriter_::
write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
{ {
omlog() << "[OFFWriter] : write ascii file\n";
unsigned int i, nV, nF; unsigned int i, nV, nF;
Vec3f v, n; Vec3f v, n;
...@@ -353,8 +351,6 @@ bool ...@@ -353,8 +351,6 @@ bool
_OFFWriter_:: _OFFWriter_::
write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
{ {
omlog() << "[OFFWriter] : write binary file\n";
unsigned int i, nV, nF; unsigned int i, nV, nF;
Vec3f v, n; Vec3f v, n;
......
...@@ -173,8 +173,6 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, ...@@ -173,8 +173,6 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
Enabler<mostream> enabler(omlog()); Enabler<mostream> enabler(omlog());
#endif #endif
omlog() << "[OMWriter] : write binary file\n";
size_t bytes = 0; size_t bytes = 0;
bool swap = _opt.check(Options::Swap) || (Endian::local() == Endian::MSB); bool swap = _opt.check(Options::Swap) || (Endian::local() == Endian::MSB);
...@@ -425,7 +423,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, ...@@ -425,7 +423,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
OMFormat::Chunk::Entity_Mesh, swap ); OMFormat::Chunk::Entity_Mesh, swap );
} }
std::clog << "#bytes written: " << bytes << std::endl; //std::clog << "#bytes written: " << bytes << std::endl;
return true; return true;
} }
...@@ -437,15 +435,15 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os, ...@@ -437,15 +435,15 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os,
OMFormat::Chunk::Entity _entity, OMFormat::Chunk::Entity _entity,
bool _swap) const bool _swap) const
{ {
omlog() << "Custom Property " << OMFormat::as_string(_entity) << " property [" //omlog() << "Custom Property " << OMFormat::as_string(_entity) << " property ["
<< _bp.name() << "]" << std::endl; // << _bp.name() << "]" << std::endl;
// Don't store if // Don't store if
// 1. it is not persistent // 1. it is not persistent
// 2. it's name is empty // 2. it's name is empty
if ( !_bp.persistent() || _bp.name().empty() ) if ( !_bp.persistent() || _bp.name().empty() )
{ {
omlog() << " skipped\n"; //omlog() << " skipped\n";
return 0; return 0;
} }
...@@ -474,13 +472,13 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os, ...@@ -474,13 +472,13 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os,
// 3. block size // 3. block size
bytes += store( _os, _bp.size_of(), OMFormat::Chunk::Integer_32, _swap ); bytes += store( _os, _bp.size_of(), OMFormat::Chunk::Integer_32, _swap );
omlog() << " n_bytes = " << _bp.size_of() << std::endl; //omlog() << " n_bytes = " << _bp.size_of() << std::endl;
// 4. data // 4. data
{ {
size_t b; size_t b;
bytes += ( b=_bp.store( _os, _swap ) ); bytes += ( b=_bp.store( _os, _swap ) );
omlog() << " b = " << b << std::endl; //omlog() << " b = " << b << std::endl;
assert( b == _bp.size_of() ); assert( b == _bp.size_of() );
} }
return bytes; return bytes;
......
...@@ -231,8 +231,7 @@ bool ...@@ -231,8 +231,7 @@ bool
_PLYWriter_:: _PLYWriter_::
write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
{ {
omlog() << "[PLYWriter] : write ascii file\n";
unsigned int i, nV, nF; unsigned int i, nV, nF;
Vec3f v, n; Vec3f v, n;
OpenMesh::Vec3ui c; OpenMesh::Vec3ui c;
...@@ -418,8 +417,7 @@ bool ...@@ -418,8 +417,7 @@ bool
_PLYWriter_:: _PLYWriter_::
write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const write_binary(std::ostream& _out, BaseExporter& _be, Options _opt) const
{ {
omlog() << "[PLYWriter] : write binary file\n";
unsigned int i, nV, nF; unsigned int i, nV, nF;
Vec3f v, n; Vec3f v, n;
Vec2f t; Vec2f t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment