[opengtl-commits] [336] show the type of stream, Debug, Warning, Release

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 336
Author:   cyrille
Date:     2008-08-31 17:25:56 +0200 (Sun, 31 Aug 2008)

Log Message:
-----------
show the type of stream, Debug, Warning, Release

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva


Modified: trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp	2008-08-31 14:50:35 UTC (rev 335)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Debug.cpp	2008-08-31 15:25:56 UTC (rev 336)
@@ -64,7 +64,7 @@
   static bool isEnabled( const std::map< GTLCore::String, LibraryDebugInfo >& infos, const GTLCore::String& _libraryName, const GTLCore::String& _fileName, const GTLCore::String& _functionName );
   static String extractFunctionName( const String& );
   static void readConfigFile( const String& _fileName, std::map< GTLCore::String, LibraryDebugInfo >& destination);
-  static std::ostream& report( std::ostream&, const std::map< GTLCore::String, LibraryDebugInfo >& _infos, const String& _libraryName, const String& _fileName, int _line, const String& _functionName );
+  static std::ostream& report( std::ostream&, const std::map< GTLCore::String, LibraryDebugInfo >& _infos, const String& _streamName, const String& _libraryName, const String& _fileName, int _line, const String& _functionName );
   // Fields
   std::ostream* m_debugStream;
   std::ostream* m_warningStream;
@@ -182,13 +182,13 @@
   return _str.substr( posBeg, posEnd - posBeg );
 }
 
-std::ostream& Debug::Private::report( std::ostream& _stream, const std::map< GTLCore::String, LibraryDebugInfo >& _infos, const String& _libraryName, const String& _fileName, int _line, const String& _functionName )
+std::ostream& Debug::Private::report( std::ostream& _stream, const std::map< GTLCore::String, LibraryDebugInfo >& _infos, const String& _streamName, const String& _libraryName, const String& _fileName, int _line, const String& _functionName )
 {
   GTLCore::String fileName = llvm::sys::Path(_fileName).getLast();
   GTLCore::String functionName = Private::extractFunctionName( _functionName );
   if( isEnabled( _infos, _libraryName, fileName, functionName ) )
   {
-    _stream << _libraryName << " (Debug): in " << fileName << " at " << _line << " in " << functionName << ": ";
+    _stream << _libraryName << " (" << _streamName << "): in " << fileName << " at " << _line << " in " << functionName << ": ";
     return _stream;
   } else {
     return *Private::instance()->m_voidStream;
@@ -198,19 +198,19 @@
 std::ostream& Debug::debug( const GTLCore::String& _libraryName, const GTLCore::String& _fileName, int _line, const GTLCore::String& _functionName )
 {
   Private* p = Private::instance();
-  return Private::report( *p->m_debugStream, p->m_librariesDebugInfo, _libraryName, _fileName, _line, _functionName );
+  return Private::report( *p->m_debugStream, p->m_librariesDebugInfo, "Debug", _libraryName, _fileName, _line, _functionName );
 }
 
 std::ostream& Debug::warning( const GTLCore::String& _libraryName, const GTLCore::String& _fileName, int _line, const GTLCore::String& _functionName )
 {
   Private* p = Private::instance();
-  return Private::report( *p->m_warningStream, p->m_librariesWarningInfo, _libraryName, _fileName, _line, _functionName );
+  return Private::report( *p->m_warningStream, p->m_librariesWarningInfo, "Warning", _libraryName, _fileName, _line, _functionName );
 }
 
 std::ostream& Debug::error( const GTLCore::String& _libraryName, const GTLCore::String& _fileName, int _line, const GTLCore::String& _functionName )
 {
   Private* p = Private::instance();
-  return Private::report( *p->m_errorStream, p->m_librariesErrorInfo, _libraryName, _fileName, _line, _functionName );
+  return Private::report( *p->m_errorStream, p->m_librariesErrorInfo, "Error", _libraryName, _fileName, _line, _functionName );
 }
 
 

Modified: trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva	2008-08-31 14:50:35 UTC (rev 335)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva	2008-08-31 15:25:56 UTC (rev 336)
@@ -2,10 +2,6 @@
 {
   void evaluatePixel(out pixel result)
   {
-    float v = 150.0;
-    float2 point = result.coord;
-    result[0] = 0.5*( point[0] / 200 + point[1] / 300 );
-    
-//     result[0] = 0.5*( result.coord[0] / 200 + result.coord[1] / 300 );
+    result[0] = 0.5*( result.coord[0] / 200 + result.coord[1] / 300 );
   }
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/