Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_nostream 4 #ifndef tools_nostream 5 #define tools_nostream 5 #define tools_nostream 6 6 7 // dummy ostream class in case we need 7 // dummy ostream class in case we need 8 // to pass a std::ostream as argument 8 // to pass a std::ostream as argument 9 // but having no concrete implementation 9 // but having no concrete implementation 10 // at hand. 10 // at hand. 11 11 12 #include <ostream> 12 #include <ostream> 13 13 14 namespace tools { 14 namespace tools { 15 15 16 class nostream : public std::ostream { 16 class nostream : public std::ostream { 17 public: 17 public: 18 nostream() 18 nostream() 19 :std::ostream(0) 19 :std::ostream(0) 20 {} 20 {} 21 virtual ~nostream(){} 21 virtual ~nostream(){} 22 private: 22 private: 23 nostream(const nostream&) 23 nostream(const nostream&) 24 :std::basic_ios<char, std::char_traits<char> 24 :std::basic_ios<char, std::char_traits<char> >() 25 #ifdef TOOLS_STL 25 #ifdef TOOLS_STL 26 ,std::basic_streambuf<char, std::char_traits 26 ,std::basic_streambuf<char, std::char_traits<char> >() 27 #endif 27 #endif 28 ,std::ostream(0){} 28 ,std::ostream(0){} 29 nostream& operator=(const nostream&){return 29 nostream& operator=(const nostream&){return *this;} 30 }; 30 }; 31 31 32 } 32 } 33 33 34 #endif 34 #endif