Finished checking debug/info messages and internationalization where appropriate

This commit is contained in:
Cirilo Bernardo 2016-01-12 18:03:17 +11:00
parent 3a5110f74a
commit 81977ed6b7
31 changed files with 322 additions and 48 deletions

View File

@ -168,6 +168,11 @@ bool S3D::WritePoint( std::ofstream& aFile, const SGPOINT& aPoint )
aFile.write( (char*)&aPoint.x, sizeof(aPoint.x) );
aFile.write( (char*)&aPoint.y, sizeof(aPoint.y) );
aFile.write( (char*)&aPoint.z, sizeof(aPoint.z) );
if( aFile.fail() )
return false;
return true;
}

View File

@ -599,10 +599,12 @@ static SCENEGRAPH* loadIDFBoard( const wxString& aFileName )
// note: if the IDF model is defective no outline substitutes shall be made
if( !brd.ReadFile( aFileName, true ) )
{
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] Failed to read IDF file:\n";
std::cerr << brd.GetError() << "\n\n";
std::cerr << " * [INFO] IDF file '" << aFileName.ToUTF8() << "'\n";
#endif
return NULL;
}

View File

@ -123,6 +123,7 @@ bool WRL1BASE::SetName( const std::string& aName )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to set name on virtual base node\n";
#endif
return false;
}
@ -135,6 +136,7 @@ bool WRL1BASE::Read( WRLPROC& proc )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] no open file or file is not a VRML1 file\n";
#endif
return false;
}
@ -179,6 +181,7 @@ bool WRL1BASE::Read( WRLPROC& proc )
size_t line = 0;
size_t column = 0;
proc.GetFilePosData( line, column );
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::cerr << " * [INFO] Processing node '" << glob << "' ID: " << ntype << "\n";
#endif
@ -414,6 +417,7 @@ bool WRL1BASE::ReadNode( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNode )
size_t line = 0;
size_t column = 0;
proc.GetFilePosData( line, column );
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::cerr << " * [INFO] Processing node '" << glob << "' ID: " << ntype << "\n";
#endif

View File

@ -53,6 +53,7 @@ WRL1COORDS::~WRL1COORDS()
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::cerr << " * [INFO] Destroying Coordinate3 node\n";
#endif
return;
}
@ -97,6 +98,7 @@ bool WRL1COORDS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -145,6 +147,7 @@ bool WRL1COORDS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -59,6 +59,7 @@ WRL1FACESET::~WRL1FACESET()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -103,6 +104,7 @@ bool WRL1FACESET::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -156,6 +158,7 @@ bool WRL1FACESET::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -170,6 +173,7 @@ bool WRL1FACESET::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -184,6 +188,7 @@ bool WRL1FACESET::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -198,6 +203,7 @@ bool WRL1FACESET::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -271,6 +277,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
std::cerr << " * [INFO] bad model: coordsize, indexsize = " << coordsize;
std::cerr << ", " << vsize << "\n";
#endif
return NULL;
}
@ -293,6 +300,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 1 )
std::cerr << " * [INFO] bad model: per face indexed but no indices\n";
#endif
return NULL;
}
@ -306,6 +314,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
std::cerr << " * [INFO] bad model: per vertex indexed but indexsize = ";
std::cerr << matIndex.size() << "\n";
#endif
return NULL;
}

View File

@ -61,6 +61,7 @@ WRL1GROUP::~WRL1GROUP()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -74,6 +75,7 @@ bool WRL1GROUP::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -89,6 +91,7 @@ bool WRL1GROUP::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -146,12 +149,12 @@ SGNODE* WRL1GROUP::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
std::cerr << m_Items.size() << " items)\n";
#endif
std::cerr << "XXX: GROUP!!!!!!!!!!\n";
if( !m_Parent )
{
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] Group has no parent\n";
#endif
return NULL;
}

View File

@ -95,6 +95,7 @@ bool WRL1MATBINDING::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -110,6 +111,7 @@ bool WRL1MATBINDING::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}

View File

@ -67,8 +67,10 @@ WRL1MATERIAL::~WRL1MATERIAL()
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::cerr << " * [INFO] Destroying SGCOLOR #" << i << "\n";
#endif
if( NULL == S3D::GetSGNodeParent( colors[i] ) )
S3D::DestroyNode( colors[i] );
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::cerr << " * [INFO] destroyed SGCOLOR #" << i << "\n";
#endif
@ -113,6 +115,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -128,6 +131,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -185,6 +189,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -199,6 +204,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -213,6 +219,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -227,6 +234,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -241,6 +249,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -255,6 +264,7 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -148,9 +148,8 @@ WRL1NODE::~WRL1NODE()
m_Items.clear();
// XXX - the dictionary may be bad - don't use it
//if( m_dictionary && !m_Name.empty() )
// m_dictionary->DelName( m_Name, this );
if( m_dictionary && !m_Name.empty() )
m_dictionary->DelName( m_Name, this );
if( m_Parent )
m_Parent->unlinkChildNode( this );
@ -307,6 +306,7 @@ bool WRL1NODE::SetName( const std::string& aName )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] invalid node name '" << aName << "' (begins with digit)\n";
#endif
return false;
}
@ -324,6 +324,7 @@ bool WRL1NODE::SetName( const std::string& aName )
std::cerr << " * [INFO] invalid node name '" << aName;
std::cerr<< "' (contains invalid character)\n";
#endif
return false;
}
@ -408,6 +409,7 @@ bool WRL1NODE::AddChildNode( WRL1NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to add a base node to another node\n";
#endif
return false;
}
@ -440,6 +442,7 @@ bool WRL1NODE::AddRefNode( WRL1NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] NULL passed as node pointer\n";
#endif
return false;
}
@ -449,6 +452,7 @@ bool WRL1NODE::AddRefNode( WRL1NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to add a base node ref to another base node\n";
#endif
return false;
}

View File

@ -55,6 +55,7 @@ WRL1SEPARATOR::~WRL1SEPARATOR()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -68,6 +69,7 @@ bool WRL1SEPARATOR::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -83,6 +85,7 @@ bool WRL1SEPARATOR::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -142,8 +145,10 @@ SGNODE* WRL1SEPARATOR::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
if( !m_Parent )
{
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] Separator has no parent\n";
#endif
return NULL;
}

View File

@ -95,6 +95,7 @@ bool WRL1SHAPEHINTS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -110,6 +111,7 @@ bool WRL1SHAPEHINTS::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}

View File

@ -59,6 +59,7 @@ WRL1SWITCH::~WRL1SWITCH()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -81,6 +82,7 @@ bool WRL1SWITCH::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -96,6 +98,7 @@ bool WRL1SWITCH::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -146,6 +149,7 @@ bool WRL1SWITCH::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}

View File

@ -55,6 +55,7 @@ WRL1TRANSFORM::~WRL1TRANSFORM()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -79,6 +80,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -111,6 +113,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -167,6 +170,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -181,6 +185,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -195,6 +200,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -209,6 +215,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -223,6 +230,7 @@ bool WRL1TRANSFORM::Read( WRLPROC& proc, WRL1BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -128,6 +128,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple material nodes\n";
#endif
return false;
}
@ -143,6 +144,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple textureTransform nodes\n";
#endif
return false;
}
@ -154,8 +156,9 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode )
{
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple texture nodes\n";
std::cerr << " * [INFO] bad file format; multiple texture nodes\n";
#endif
return false;
}
@ -197,6 +200,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple material nodes\n";
#endif
return false;
}
@ -212,6 +216,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple textureTransform nodes\n";
#endif
return false;
}
@ -225,6 +230,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple texture nodes\n";
#endif
return false;
}
@ -241,6 +247,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -256,6 +263,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -307,6 +315,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read material information\n";
#endif
return false;
}
}
@ -318,6 +327,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read texture information\n";
#endif
return false;
}
}
@ -329,6 +339,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read textureTransform information\n";
#endif
return false;
}
}

View File

@ -120,6 +120,7 @@ bool WRL2BASE::SetName( const std::string& aName )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to set name on virtual base node\n";
#endif
return false;
}
@ -132,6 +133,7 @@ bool WRL2BASE::Read( WRLPROC& proc )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] no open file or file is not a VRML2 file\n";
#endif
return false;
}
@ -395,6 +397,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
size_t line = 0;
size_t column = 0;
proc.GetFilePosData( line, column );
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 )
std::cerr << " * [INFO] Processing node '" << glob << "' ID: " << ntype << "\n";
#endif
@ -432,6 +435,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
#ifdef DEBUG_VRML2
std::cerr << " * [INFO] FAIL: discard " << glob << " node at l" << line << ", c" << column << "\n";
#endif
return false;
}
#ifdef DEBUG_VRML2
@ -457,6 +461,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
#ifdef DEBUG_VRML2
std::cerr << " * [INFO] FAIL: discard " << glob << " node at l" << line << ", c" << column << "\n";
#endif
return false;
}
#ifdef DEBUG_VRML2
@ -475,6 +480,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
#ifdef DEBUG_VRML2
std::cerr << " * [INFO] FAIL: discard " << glob << " node at l" << line << ", c" << column << "\n";
#endif
return false;
}
#ifdef DEBUG_VRML2
@ -493,6 +499,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
#ifdef DEBUG_VRML2
std::cerr << " * [INFO] FAIL: discard " << glob << " node at l" << line << ", c" << column << "\n";
#endif
return false;
}
#ifdef DEBUG_VRML2
@ -553,6 +560,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
#ifdef DEBUG_VRML2
std::cerr << " * [INFO] FAIL: discard " << glob << " node at l" << line << ", c" << column << "\n";
#endif
return false;
}
#ifdef DEBUG_VRML2

View File

@ -60,6 +60,7 @@ WRL2BOX::~WRL2BOX()
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 )
std::cerr << " * [INFO] Destroying Box node\n";
#endif
return;
}
@ -89,6 +90,7 @@ bool WRL2BOX::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -137,6 +139,7 @@ bool WRL2BOX::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -52,6 +52,7 @@ WRL2COLOR::~WRL2COLOR()
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 )
std::cerr << " * [INFO] Destroying Color node\n";
#endif
return;
}
@ -107,6 +108,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -155,6 +157,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -51,7 +51,8 @@ WRL2COORDS::~WRL2COORDS()
{
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 )
std::cerr << " * [INFO] Destroying Coordinate node\n";
#endif
#endif
return;
}
@ -107,6 +108,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -155,6 +157,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -60,6 +60,7 @@ WRL2FACESET::~WRL2FACESET()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -150,6 +151,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -165,6 +167,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -180,6 +183,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple normal nodes\n";
#endif
return false;
}
@ -193,6 +197,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] unexpected code branch\n";
#endif
return false;
}
@ -202,6 +207,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple texCoord nodes\n";
#endif
return false;
}
@ -243,6 +249,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -258,6 +265,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -273,6 +281,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple normal nodes\n";
#endif
return false;
}
@ -286,6 +295,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] unexpected code branch\n";
#endif
return false;
}
@ -295,6 +305,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple texCoord nodes\n";
#endif
return false;
}
@ -318,6 +329,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -386,6 +398,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -400,6 +413,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -414,6 +428,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -428,6 +443,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -442,6 +458,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -456,6 +473,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -470,6 +488,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -484,6 +503,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -498,6 +518,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -509,6 +530,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read color node information\n";
#endif
return false;
}
}
@ -520,6 +542,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read coord node information\n";
#endif
return false;
}
}
@ -531,6 +554,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read normal node information\n";
#endif
return false;
}
}
@ -542,6 +566,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read texCoord node information\n";
#endif
return false;
}
}
@ -719,6 +744,7 @@ SGNODE* WRL2FACESET::TranslateToSG( SGNODE* aParent, bool calcNormals )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file; colorIndex.size() < coordIndex.size()\n";
#endif
return NULL;
}

View File

@ -60,6 +60,7 @@ WRL2LINESET::~WRL2LINESET()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -137,6 +138,7 @@ bool WRL2LINESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -152,6 +154,7 @@ bool WRL2LINESET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -196,6 +199,7 @@ bool WRL2LINESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -211,6 +215,7 @@ bool WRL2LINESET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -237,6 +242,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -296,6 +302,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -310,6 +317,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -324,6 +332,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -335,6 +344,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read color node information\n";
#endif
return false;
}
}
@ -346,6 +356,7 @@ bool WRL2LINESET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read coord node information\n";
#endif
return false;
}
}

View File

@ -126,6 +126,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -141,6 +142,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -198,6 +200,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -212,6 +215,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -226,6 +230,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -240,6 +245,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -254,6 +260,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -268,6 +275,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -225,6 +225,7 @@ bool WRL2NODE::SetName( const std::string& aName )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] invalid node name '" << *item << "' (matches restricted word)\n";
#endif
return false;
}
@ -235,6 +236,7 @@ bool WRL2NODE::SetName( const std::string& aName )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] invalid node name '" << *item << "' (begins with digit)\n";
#endif
return false;
}
@ -253,6 +255,7 @@ bool WRL2NODE::SetName( const std::string& aName )
std::cerr << " * [INFO] invalid node name '" << aName;
std::cerr<< "' (contains invalid character)\n";
#endif
return false;
}
@ -355,6 +358,7 @@ bool WRL2NODE::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to add a base node to another node\n";
#endif
return false;
}
@ -386,6 +390,7 @@ bool WRL2NODE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] NULL passed as node pointer\n";
#endif
return false;
}
@ -395,6 +400,7 @@ bool WRL2NODE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] attempting to add a base node ref to another base node\n";
#endif
return false;
}

View File

@ -52,6 +52,7 @@ WRL2NORMS::~WRL2NORMS()
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 3 )
std::cerr << " * [INFO] Destroying Normal node\n";
#endif
return;
}
@ -107,6 +108,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -155,6 +157,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}

View File

@ -60,6 +60,7 @@ WRL2POINTSET::~WRL2POINTSET()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -136,6 +137,7 @@ bool WRL2POINTSET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -151,6 +153,7 @@ bool WRL2POINTSET::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -195,6 +198,7 @@ bool WRL2POINTSET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple color nodes\n";
#endif
return false;
}
@ -210,6 +214,7 @@ bool WRL2POINTSET::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n";
#endif
return false;
}
@ -236,6 +241,7 @@ bool WRL2POINTSET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -286,6 +292,7 @@ bool WRL2POINTSET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read color node information\n";
#endif
return false;
}
}
@ -297,6 +304,7 @@ bool WRL2POINTSET::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read coord node information\n";
#endif
return false;
}
}

View File

@ -60,6 +60,7 @@ WRL2SHAPE::~WRL2SHAPE()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -112,6 +113,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple appearance nodes\n";
#endif
return false;
}
@ -125,6 +127,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple geometry nodes\n";
#endif
return false;
}
@ -166,6 +169,7 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple appearance nodes\n";
#endif
return false;
}
@ -177,8 +181,9 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode )
{
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] bad file format; multiple geometry nodes\n";
std::cerr << " * [INFO] bad file format; multiple geometry nodes\n";
#endif
return false;
}
@ -221,6 +226,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -236,6 +242,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -286,6 +293,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read appearance information\n";
#endif
return false;
}
}
@ -297,6 +305,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [INFO] could not read geometry information\n";
#endif
return false;
}
}

View File

@ -57,6 +57,7 @@ WRL2SWITCH::~WRL2SWITCH()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -86,6 +87,7 @@ bool WRL2SWITCH::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -101,6 +103,7 @@ bool WRL2SWITCH::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -154,6 +157,7 @@ bool WRL2SWITCH::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -187,6 +191,7 @@ bool WRL2SWITCH::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] NULL passed as node pointer\n";
#endif
return false;
}
@ -221,6 +226,7 @@ bool WRL2SWITCH::readChildren( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -280,6 +286,7 @@ SGNODE* WRL2SWITCH::TranslateToSG( SGNODE* aParent, bool calcNormals )
#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 )
std::cerr << " * [INFO] Switch translation: no choices\n";
#endif
return NULL;
}

View File

@ -54,6 +54,7 @@ WRL2TRANSFORM::~WRL2TRANSFORM()
std::cerr << " children, " << m_Refs.size() << " references and ";
std::cerr << m_BackPointers.size() << " backpointers\n";
#endif
return;
}
@ -91,6 +92,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] aTopNode is NULL\n";
#endif
return false;
}
@ -125,6 +127,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}
@ -182,6 +185,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -196,6 +200,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -210,6 +215,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -224,6 +230,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -238,6 +245,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] file: '" << proc.GetFileName() << "'\n";
std::cerr << " * [INFO] message: '" << proc.GetError() << "'\n";
#endif
return false;
}
}
@ -271,6 +279,7 @@ bool WRL2TRANSFORM::AddRefNode( WRL2NODE* aNode )
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * [BUG] NULL passed as node pointer\n";
#endif
return false;
}
@ -305,6 +314,7 @@ bool WRL2TRANSFORM::readChildren( WRLPROC& proc, WRL2BASE* aTopNode )
std::cerr << " * [INFO] bad file format; unexpected eof at line ";
std::cerr << line << ", column " << column << "\n";
#endif
return false;
}

View File

@ -191,7 +191,7 @@ SCENEGRAPH* Load( char const* aFileName )
catch( IO_ERROR &e )
{
#ifdef DEBUG
std::cout << " * [INFO] load failed: input line too long\n";
std::cerr << " * [INFO] load failed: input line too long\n";
#endif
return NULL;
}
@ -203,7 +203,7 @@ SCENEGRAPH* Load( char const* aFileName )
if( proc.GetVRMLType() == VRML_V1 )
{
#ifdef DEBUG
std::cout << " * [INFO] Processing VRML 1.0 file\n";
std::cerr << " * [INFO] Processing VRML 1.0 file\n";
#endif
WRL1BASE* bp = new WRL1BASE;
@ -214,13 +214,13 @@ SCENEGRAPH* Load( char const* aFileName )
if( !bp->Read( proc ) )
{
#ifdef DEBUG
std::cout << " * [INFO] load failed\n";
std::cerr << " * [INFO] load failed\n";
#endif
}
else
{
#ifdef DEBUG
std::cout << " * [INFO] load completed\n";
std::cerr << " * [INFO] load completed\n";
#endif
scene = (SCENEGRAPH*)bp->TranslateToSG( NULL, NULL );
@ -231,7 +231,7 @@ SCENEGRAPH* Load( char const* aFileName )
else
{
#ifdef DEBUG
std::cout << " * [INFO] Processing VRML 2.0 file\n";
std::cerr << " * [INFO] Processing VRML 2.0 file\n";
#endif
WRL2BASE* bp = new WRL2BASE;
@ -242,13 +242,13 @@ SCENEGRAPH* Load( char const* aFileName )
if( !bp->Read( proc ) )
{
#ifdef DEBUG
std::cout << " * [INFO] load failed\n";
std::cerr << " * [INFO] load failed\n";
#endif
}
else
{
#ifdef DEBUG
std::cout << " * [INFO] load completed\n";
std::cerr << " * [INFO] load completed\n";
#endif
// for now we recalculate all normals per-vertex per-face

View File

@ -374,7 +374,10 @@ bool WRLPROC::DiscardNode( void )
ostr << ", column " << m_bufpos;
m_error = ostr.str();
#ifdef DEBUG
std::cerr << m_error << "\n";
#endif
return false;
}

View File

@ -95,8 +95,9 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !m_getNExtensions )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
std::cerr << " * missing function: GetNExtensions\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetNExtensions')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
@ -105,11 +106,16 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetModelExtension')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: GetModelExtension\n";
else
{
wxString errmsg = _( "missing function 'GetModelExtension'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_getNFilters )
@ -117,11 +123,16 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetNFilters')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: GetNFilters\n";
else
{
wxString errmsg = _( "missing function 'GetNFilters'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_getFileFilter )
@ -129,11 +140,16 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetFileFilter')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: GetFileFilter\n";
else
{
wxString errmsg = _( "missing function 'GetFileFilter'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_canRender )
@ -141,11 +157,16 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'CanRender')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: CanRender\n";
else
{
wxString errmsg = _( "missing function 'CanRender'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_load )
@ -153,11 +174,16 @@ bool KICAD_PLUGIN_LDR_3D::Open( const wxString& aFullFileName )
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'Load')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: Load\n";
else
{
wxString errmsg = _( "missing function 'Load'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
#endif
@ -237,8 +263,12 @@ int KICAD_PLUGIN_LDR_3D::GetNExtensions( void )
if( NULL == m_getNExtensions )
{
m_error = "[BUG] GetNExtensions is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return 0;
}
@ -261,8 +291,12 @@ char const* KICAD_PLUGIN_LDR_3D::GetModelExtension( int aIndex )
if( NULL == m_getModelExtension )
{
m_error = "[BUG] GetModelExtension is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return NULL;
}
@ -285,8 +319,12 @@ int KICAD_PLUGIN_LDR_3D::GetNFilters( void )
if( NULL == m_getNFilters )
{
m_error = "[BUG] GetNFilters is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return 0;
}
@ -309,8 +347,12 @@ char const* KICAD_PLUGIN_LDR_3D::GetFileFilter( int aIndex )
if( NULL == m_getFileFilter )
{
m_error = "[BUG] GetFileFilter is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return NULL;
}
@ -333,8 +375,12 @@ bool KICAD_PLUGIN_LDR_3D::CanRender( void )
if( NULL == m_canRender )
{
m_error = "[BUG] CanRender is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return false;
}
@ -357,8 +403,12 @@ SCENEGRAPH* KICAD_PLUGIN_LDR_3D::Load( char const* aFileName )
if( NULL == m_load )
{
m_error = "[BUG] Load is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return NULL;
}

View File

@ -24,6 +24,8 @@
#include <sstream>
#include <iostream>
#include <wx/dynload.h>
#include <wx/string.h>
#include <wx/translation.h>
#include "pluginldr.h"
@ -83,8 +85,9 @@ bool KICAD_PLUGIN_LDR::open( const wxString& aFullFileName, const char* aPluginC
if( !m_getPluginClass )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
std::cerr << " * missing function: GetKicadPluginClass\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetKicadPluginClass')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
@ -93,11 +96,16 @@ bool KICAD_PLUGIN_LDR::open( const wxString& aFullFileName, const char* aPluginC
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetClassVersion')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: GetClassVersion\n";
else
{
wxString errmsg = _( "missing function 'GetClassVersion'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_checkClassVersion )
@ -105,11 +113,16 @@ bool KICAD_PLUGIN_LDR::open( const wxString& aFullFileName, const char* aPluginC
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'CheckClassVersion')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: CheckClassVersion\n";
else
{
wxString errmsg = _( "missing function 'CheckClassVersion'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_getPluginName )
@ -117,11 +130,16 @@ bool KICAD_PLUGIN_LDR::open( const wxString& aFullFileName, const char* aPluginC
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetKicadPluginName')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
std::cerr << " * missing function: GetKicadPluginName\n";
else
{
wxString errmsg = _( "missing function 'GetKicadPluginName'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
}
if( !m_getVersion )
@ -129,10 +147,16 @@ bool KICAD_PLUGIN_LDR::open( const wxString& aFullFileName, const char* aPluginC
if( !fail )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * incompatible plugin: " << aFullFileName.ToUTF8() << "\n";
wxString errmsg = _( "incompatible plugin (missing function 'GetVersion')" );
std::cerr << errmsg.ToUTF8() << "\n";
std::cerr << "'" << aFullFileName.ToUTF8() << "'\n";
fail = true;
}
else
{
wxString errmsg = _( "missing function 'GetVersion'" );
std::cerr << errmsg.ToUTF8() << "\n";
}
std::cerr << " * missing function: GetVersion\n";
}
#endif
@ -269,8 +293,12 @@ char const* KICAD_PLUGIN_LDR::GetKicadPluginClass( void )
if( NULL == m_getPluginClass )
{
m_error = "[BUG] GetPluginClass is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return NULL;
}
@ -311,8 +339,12 @@ bool KICAD_PLUGIN_LDR::GetClassVersion( unsigned char* Major, unsigned char* Min
if( NULL == m_checkClassVersion )
{
m_error = "[BUG] CheckClassVersion is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return false;
}
@ -344,15 +376,19 @@ bool KICAD_PLUGIN_LDR::CheckClassVersion( unsigned char Major, unsigned char Min
if( m_error.empty() )
m_error = "[INFO] no open plugin / plugin could not be opened";
return NULL;
return false;
}
if( NULL == m_checkClassVersion )
{
m_error = "[BUG] CheckClassVersion is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
return NULL;
#endif
return false;
}
return m_checkClassVersion( Major, Minor, Patch, Revision );
@ -374,8 +410,12 @@ const char* KICAD_PLUGIN_LDR::GetKicadPluginName( void )
if( NULL == m_getPluginName )
{
m_error = "[BUG] GetKicadPluginName is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return NULL;
}
@ -399,8 +439,12 @@ bool KICAD_PLUGIN_LDR::GetVersion( unsigned char* Major, unsigned char* Minor,
if( NULL == m_getVersion )
{
m_error = "[BUG] GetKicadPluginName is not linked";
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << " * " << m_error << "\n";
#endif
return false;
}