Panda3D
 All Classes Functions Variables Enumerations
pfstream.I
1 // Filename: pfstream.I
2 // Created by: cary (12Dec00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 INLINE IPipeStream::IPipeStream(const std::string cmd)
16  : istream(&_psb), _psb(PipeStreamBuf::Input) {
17  _psb.command(cmd);
18 }
19 
20 INLINE void IPipeStream::flush(void) {
21  _psb.flush();
22 }
23 
24 INLINE IPipeStream::IPipeStream(void)
25  : istream(&_psb), _psb(PipeStreamBuf::Input) {
26  cerr << "should never call default constructor of IPipeStream" << endl;
27 }
28 
29 INLINE OPipeStream::OPipeStream(const std::string cmd)
30  : ostream(&_psb), _psb(PipeStreamBuf::Output) {
31  _psb.command(cmd);
32 }
33 
34 INLINE void OPipeStream::flush(void) {
35  _psb.flush();
36 }
37 
38 INLINE OPipeStream::OPipeStream(void)
39  : ostream(&_psb), _psb(PipeStreamBuf::Output) {
40  cerr << "should never call default constructor of OPipeStream" << endl;
41 }