rtcOutputHandler.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009
00003  * Robert Bosch LLC
00004  * Research and Technology Center North America
00005  * Palo Alto, California
00006  *
00007  * All rights reserved.
00008  *
00009  *------------------------------------------------------------------------------
00010  * project ....: Autonomous Technologies
00011  * file .......: rtcOutputHandler.cpp
00012  * authors ....: Benjamin Pitzer
00013  * organization: Robert Bosch LLC
00014  * creation ...: 10/16/2006
00015  * modified ...: $Date: 2009-01-21 18:19:16 -0800 (Wed, 21 Jan 2009) $
00016  * changed by .: $Author: benjaminpitzer $
00017  * revision ...: $Revision: 14 $
00018  */
00019 
00020 //== INCLUDES =================================================================
00021 #include "rtc/rtcOutputHandler.h"
00022 
00023 //== NAMESPACES ===============================================================
00024 namespace rtc {
00025 
00026 //== IMPLEMENTATION ===========================================================
00027 
00029 OutputHandler::OutputHandler()
00030 : outStream(NULL)
00031 {
00032 }
00033 
00035 OutputHandler::OutputHandler(std::ostream& os)
00036 : outStream(&os)
00037 {
00038 }
00039 
00041 OutputHandler::~OutputHandler()
00042 {
00043   outStream = NULL;
00044 }
00045 
00046 void OutputHandler::use(std::ostream& os)
00047 {
00048   outStream = &os;
00049 }
00050 
00052 std::ostream& OutputHandler::stream()
00053 {
00054   return *outStream;
00055 }
00056 
00058 bool OutputHandler::good() const
00059 {
00060   if(!outStream) return false;
00061   return outStream->good();
00062 }
00063 
00064 //=============================================================================
00065 } // namespace rtc
00066 //=============================================================================


rtc
Author(s): Benjamin Pitzer
autogenerated on Mon Oct 6 2014 10:07:35