Panda3D

pfstream.I

00001 // Filename: pfstream.I
00002 // Created by:  cary (12Dec00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 INLINE IPipeStream::IPipeStream(const std::string cmd)
00016   : istream(&_psb), _psb(PipeStreamBuf::Input) {
00017   _psb.command(cmd);
00018 }
00019 
00020 INLINE void IPipeStream::flush(void) {
00021   _psb.flush();
00022 }
00023 
00024 INLINE IPipeStream::IPipeStream(void)
00025   : istream(&_psb), _psb(PipeStreamBuf::Input) {
00026   cerr << "should never call default constructor of IPipeStream" << endl;
00027 }
00028 
00029 INLINE OPipeStream::OPipeStream(const std::string cmd)
00030   : ostream(&_psb), _psb(PipeStreamBuf::Output) {
00031   _psb.command(cmd);
00032 }
00033 
00034 INLINE void OPipeStream::flush(void) {
00035   _psb.flush();
00036 }
00037 
00038 INLINE OPipeStream::OPipeStream(void)
00039   : ostream(&_psb), _psb(PipeStreamBuf::Output) {
00040   cerr << "should never call default constructor of OPipeStream" << endl;
00041 }
 All Classes Functions Variables Enumerations