FEI Version of the Day
fei_console_ostream.cpp
00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #include "fei_macros.hpp"
00010 #include "fei_iostream.hpp"
00011 
00012 namespace fei {
00013 
00014 std::ostream* console_ostream_ptr(std::ostream* osptr=NULL)
00015 {
00016   static std::ostream* fei_ostream_ptr = &std::cerr;
00017   if (osptr) fei_ostream_ptr = osptr;
00018   return fei_ostream_ptr;
00019 }
00020 
00021 void set_console_ostream(std::ostream& os)
00022 {
00023   console_ostream_ptr(&os);
00024 }
00025 
00026 std::ostream& console_out()
00027 {
00028   return *console_ostream_ptr();
00029 }
00030 
00031 }//namespace fei
00032 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends