|
||||
File indexing completed on 2025-01-18 09:57:45
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIPYTHON_PRINTER_H 0012 #define GAUDIPYTHON_PRINTER_H 1 0013 // ============================================================================ 0014 // Include files 0015 // ============================================================================ 0016 // STD & STL 0017 // ============================================================================ 0018 #include <sstream> 0019 #include <string> 0020 // ============================================================================ 0021 // GaudiKernel 0022 // ============================================================================ 0023 #include "GaudiKernel/ContainedObject.h" 0024 #include "GaudiKernel/DataObject.h" 0025 // ============================================================================ 0026 0027 namespace GaudiPython { 0028 /** @struct Printer Printer.h GaudiPython/Printer.h 0029 * 0030 * 0031 * @author Vanya BELYAEV Ivan.Belyaev@itep.ru 0032 * @date 2005-08-05 0033 */ 0034 template <class TYPE> 0035 struct Printer { 0036 static std::string print( const TYPE& object ) { 0037 std::stringstream stream; 0038 stream << object << std::endl; 0039 return stream.str(); 0040 }; 0041 }; 0042 template <> 0043 struct Printer<ContainedObject> { 0044 static std::string print( const ContainedObject& object ) { 0045 std::ostringstream stream; 0046 object.fillStream( stream ); 0047 return stream.str(); 0048 }; 0049 }; 0050 template <> 0051 struct Printer<DataObject> { 0052 static std::string print( const DataObject& type ) { 0053 std::ostringstream stream; 0054 type.fillStream( stream ); 0055 return stream.str(); 0056 }; 0057 }; 0058 0059 } // end of namespace GaudiPython 0060 0061 #endif // GAUDIPYTHON_PRINTER_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |