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