Teuchos_basic_oblackholestream.hpp

Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////
00002 // Teuchos_basic_oblackholeostream.h
00003 
00004 // @HEADER 
00005 // ***********************************************************************
00006 // 
00007 //                    Teuchos: Common Tools Package
00008 //                 Copyright (2004) Sandia Corporation
00009 // 
00010 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00011 // license for use of this work by or on behalf of the U.S. Government.
00012 // 
00013 // This library is free software; you can redistribute it and/or modify
00014 // it under the terms of the GNU Lesser General Public License as
00015 // published by the Free Software Foundation; either version 2.1 of the
00016 // License, or (at your option) any later version.
00017 //  
00018 // This library is distributed in the hope that it will be useful, but
00019 // WITHOUT ANY WARRANTY; without even the implied warranty of
00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021 // Lesser General Public License for more details.
00022 //  
00023 // You should have received a copy of the GNU Lesser General Public
00024 // License along with this library; if not, write to the Free Software
00025 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00026 // USA
00027 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00028 // 
00029 // ***********************************************************************
00030 // @HEADER
00031 
00032 #ifndef TEUCHOS_BASIC_O_BLACK_HOLE_STREAM_H
00033 #define TEUCHOS_BASIC_O_BLACK_HOLE_STREAM_H
00034 
00035 #include "Teuchos_ConfigDefs.hpp"
00036 
00037 namespace Teuchos {
00038 
00040 
00046 template<typename _CharT, typename _Traits>
00047 class basic_oblackholestream
00048   : virtual public std::basic_ostream<_CharT, _Traits>
00049 {
00050 public:
00051 
00052   // Types (inherited from basic_ios (27.4.4)):
00053   typedef _CharT                        char_type;
00054   typedef typename _Traits::int_type    int_type;
00055   typedef typename _Traits::pos_type    pos_type;
00056   typedef typename _Traits::off_type    off_type;
00057   typedef _Traits                       traits_type;
00058   
00059   // Non-standard Types:
00060   typedef std::basic_streambuf<_CharT, _Traits>      __streambuf_type;
00061   typedef std::basic_ios<_CharT, _Traits>            __ios_type;
00062   typedef std::basic_ostream<_CharT, _Traits>        __ostream_type;
00063 
00064   // 27.6.2.2 Constructor/destructor:
00065   explicit basic_oblackholestream() : __ostream_type(NULL) {}
00066 //  explicit basic_oblackholestream(__streambuf_type* __sb) : __ostream_type(NULL){}
00067   virtual ~basic_oblackholestream() { }
00068 
00069   // 27.6.2.5 Formatted output:
00070   // 27.6.2.5.3  basic_ostream::operator<<
00071   __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { return *this; }
00072   __ostream_type& operator<<(__ios_type& (*__pf)(__ios_type&)) { return *this; }
00073   __ostream_type& operator<<(std::ios_base& (*__pf) (std::ios_base&)) { return *this; }
00074 
00075   // 27.6.2.5.2 Arithmetic Inserters
00076   __ostream_type& operator<<(long __n) { return *this; }
00077   __ostream_type& operator<<(unsigned long __n) { return *this; }
00078     __ostream_type& operator<<(bool __n) { return *this; }
00079   __ostream_type& operator<<(short __n) { return *this; }
00080   __ostream_type& operator<<(unsigned short __n) { return *this; }
00081   __ostream_type& operator<<(int __n) { return *this; }
00082   __ostream_type& operator<<(unsigned int __n) { return *this; }
00083   __ostream_type& operator<<(double __f) { return *this; }
00084   __ostream_type& operator<<(float __f) { return *this; }
00085   __ostream_type& operator<<(long double __f) { return *this; }
00086   __ostream_type& operator<<(const void* __p) { return *this; }
00087   __ostream_type& operator<<(__streambuf_type* __sb) { return *this; }
00088 
00089   // Unformatted output:
00090   __ostream_type& put(char_type __c) { return *this; }
00091   __ostream_type& write(const char_type* __s, std::streamsize __n) { return *this; }
00092   __ostream_type& flush() { return *this; }
00093 
00094   // Seeks:
00095   pos_type tellp() { return 0; }
00096   __ostream_type& seekp(pos_type) { return *this; }
00097   __ostream_type& seekp(off_type, std::ios_base::seekdir) { return *this; }
00098 
00099 }; // end class basic_oblackholestream
00100 
00101 } // end namespace Teuchos
00102 
00103 #endif // TEUCHOS_BASIC_O_BLACK_HOLE_STREAM_H

Generated on Thu Sep 18 12:41:17 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1