Gaudi Framework, version v21r9

Home   Generated: 3 May 2010

Printer.h

Go to the documentation of this file.
00001 // $Id: Printer.h,v 1.2 2005/10/14 12:57:13 mato Exp $
00002 // ============================================================================
00003 #ifndef GAUDIPYTHON_PRINTER_H 
00004 #define GAUDIPYTHON_PRINTER_H 1
00005 // ============================================================================
00006 // Include files
00007 // ============================================================================
00008 // STD & STL 
00009 // ============================================================================
00010 #include <string>
00011 #include <sstream>
00012 // ============================================================================
00013 // GaudiKernel
00014 // ============================================================================
00015 #include "GaudiKernel/ContainedObject.h"
00016 #include "GaudiKernel/DataObject.h"
00017 // ============================================================================
00018 
00019 namespace GaudiPython 
00020 {
00027   template <class TYPE>
00028   struct Printer 
00029   {
00030     static std::string print 
00031     ( const TYPE& object ) 
00032     {
00033       std::stringstream stream ;
00034       stream << object << std::endl ;
00035       return stream.str() ;
00036     } ;
00037   } ;
00038   template<> 
00039   struct Printer<ContainedObject>
00040   {
00041     static std::string print 
00042     ( const ContainedObject& object ) 
00043     {
00044       std::ostringstream stream ;
00045       object.fillStream( stream ) ;
00046       return stream.str() ;
00047     } ;
00048   } ;
00049   template<> 
00050   struct Printer<DataObject>
00051   {
00052     static std::string print ( const DataObject& type ) 
00053     {
00054       std::ostringstream stream ;
00055       type.fillStream( stream ) ;
00056       return stream.str() ;
00057     } ;
00058   };
00059 
00060 } // end of namespace GaudiPython 
00061 
00062 #endif // GAUDIPYTHON_PRINTER_H
00063 // ============================================================================

Generated at Mon May 3 12:14:39 2010 for Gaudi Framework, version v21r9 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004