rtcInputHandler.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 .......: rtcInputHandler.cpp
00012  * authors ....: Benjamin Pitzer
00013  * organization: Robert Bosch LLC
00014  * creation ...: 01/20/2009
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/rtcInputHandler.h"
00022 
00023 //== NAMESPACES ===============================================================
00024 namespace rtc {
00025 
00026 //== IMPLEMENTATION ==========================================================
00027 
00029 InputHandler::InputHandler()
00030 : inStream(NULL)
00031 {
00032 }
00033 
00035 InputHandler::InputHandler(std::istream& is)
00036 : inStream(&is)
00037 {
00038 }
00039 
00041 InputHandler::~InputHandler()
00042 {
00043   inStream = NULL;
00044 }
00045 
00046 void InputHandler::use(std::istream& is)
00047 {
00048   inStream = &is;
00049 }
00050 
00052 std::istream& InputHandler::stream()
00053 {
00054   return *inStream;
00055 }
00056 
00058 bool InputHandler::good() const
00059 {
00060   if(!inStream) return false;
00061   return inStream->good();
00062 }
00063 
00064 //=============================================================================
00065 } // namespace rtc
00066 //=============================================================================


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