Common base class providing constants and typenames.
| 269 | { |
| 270 | /// Common base class providing constants and typenames. |
| 271 | struct pstreams |
| 272 | { |
| 273 | /// Type used to specify how to connect to the process. |
| 274 | typedef std::ios_base::openmode pmode; |
| 275 | |
| 276 | /// Type used to hold the arguments for a command. |
| 277 | typedef std::vector<std::string> argv_type; |
| 278 | |
| 279 | /// Type used for file descriptors. |
| 280 | typedef int fd_type; |
| 281 | |
| 282 | static const pmode pstdin = std::ios_base::out; ///< Write to stdin |
| 283 | static const pmode pstdout = std::ios_base::in; ///< Read from stdout |
| 284 | static const pmode pstderr = std::ios_base::app; ///< Read from stderr |
| 285 | |
| 286 | /// Create a new process group for the child process. |
| 287 | static const pmode newpg = std::ios_base::trunc; |
| 288 | |
| 289 | protected: |
| 290 | enum { bufsz = 32 }; ///< Size of pstreambuf buffers. |
| 291 | enum { pbsz = 2 }; ///< Number of putback characters kept. |
| 292 | }; |
| 293 | |
| 294 | /// Class template for stream buffer. |
| 295 | template <typename CharT, typename Traits = std::char_traits<CharT> > |
nothing calls this directly
no outgoing calls
no test coverage detected