FEI Version of the Day
Loading...
Searching...
No Matches
fei_console_ostream.cpp
1/*--------------------------------------------------------------------*/
2/* Copyright 2005 Sandia Corporation. */
3/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4/* non-exclusive license for use of this work by or on behalf */
5/* of the U.S. Government. Export of this program may require */
6/* a license from the United States Government. */
7/*--------------------------------------------------------------------*/
8
9#include "fei_macros.hpp"
10#include "fei_iostream.hpp"
11
12namespace fei {
13
14std::ostream* console_ostream_ptr(std::ostream* osptr=NULL)
15{
16 static std::ostream* fei_ostream_ptr = &std::cerr;
17 if (osptr) fei_ostream_ptr = osptr;
18 return fei_ostream_ptr;
19}
20
21void set_console_ostream(std::ostream& os)
22{
23 console_ostream_ptr(&os);
24}
25
26std::ostream& console_out()
27{
28 return *console_ostream_ptr();
29}
30
31}//namespace fei
32
void set_console_ostream(std::ostream &os)
std::ostream & console_out()