wibble::sys::Pipe Struct Reference

`#include <pipe.h>`

Collaboration diagram for wibble::sys::Pipe:
[legend]

## Classes

struct | Writer

## Public Types

typedef std::deque< char > | Buffer

## Public Member Functions

| Pipe (int p)
| Pipe ()
void | write (std::string what)
void | close ()
bool | valid ()
bool | active ()
bool | eof ()
int | readMore ()
std::string | nextChunk ()
std::string | nextLine ()
void | wait ()
std::string | nextLineBlocking ()

## Static Public Member Functions

static bool | blocking (int err)

## Public Attributes

Buffer | buffer
int | fd
bool | _eof
Writer | writer

## Member Typedef Documentation

## Buffer

typedef std::deque< char > wibble::sys::Pipe::Buffer

## Constructor & Destructor Documentation

## Pipe() [1/2]

wibble::sys::Pipe::Pipe | ( | int | p | ) |

inline

References fd.

## Pipe() [2/2]

wibble::sys::Pipe::Pipe | ( |  | ) |

inline

## Member Function Documentation

## active()

bool wibble::sys::Pipe::active | ( |  | ) |

inline

References eof(), and valid().

## blocking()

static bool wibble::sys::Pipe::blocking | ( | int | err | ) |

inline static

Referenced by wibble::sys::Pipe::Writer::main(), and readMore().

## close()

void wibble::sys::Pipe::close | ( |  | ) |

inline

References wibble::sys::Pipe::Writer::close, fd, wibble::sys::Pipe::Writer::mutex, wibble::sys::Pipe::Writer::running, and writer.

## eof()

bool wibble::sys::Pipe::eof | ( |  | ) |

inline

References _eof.

Referenced by active(), nextLineBlocking(), wibble::sys::PipeThrough::run(), and wait().

## nextChunk()

std::string wibble::sys::Pipe::nextChunk | ( |  | ) |

inline

References buffer.

Referenced by wibble::sys::PipeThrough::run().

## nextLine()

std::string wibble::sys::Pipe::nextLine | ( |  | ) |

inline

References assert, buffer, wibble::iterator(), readMore(), and valid().

Referenced by nextLineBlocking().

## nextLineBlocking()

std::string wibble::sys::Pipe::nextLineBlocking | ( |  | ) |

inline

References assert, buffer, eof(), nextLine(), valid(), and wait().

Referenced by Main::waitForAck().

## readMore()

int wibble::sys::Pipe::readMore | ( |  | ) |

inline

References _eof, assert, blocking(), buffer, fd, and valid().

Referenced by nextLine(), and wait().

## valid()

bool wibble::sys::Pipe::valid | ( |  | ) |

inline

References fd.

Referenced by active(), nextLine(), nextLineBlocking(), readMore(), and wait().

## wait()

void wibble::sys::Pipe::wait | ( |  | ) |

inline

References assert, buffer, eof(), fd, readMore(), wibble::sys::sleep(), and valid().

Referenced by nextLineBlocking(), and wibble::sys::PipeThrough::run().

## write()

void wibble::sys::Pipe::write | ( | std::string | what | ) |

inline

References fd, wibble::sys::Pipe::Writer::run(), and writer.

Referenced by wibble::sys::Pipe::Writer::main().

## Member Data Documentation

## _eof

bool wibble::sys::Pipe::_eof

Referenced by eof(), and readMore().

## buffer

Buffer wibble::sys::Pipe::buffer

Referenced by nextChunk(), nextLine(), nextLineBlocking(), readMore(), and wait().

## fd

int wibble::sys::Pipe::fd

Referenced by close(), Pipe(), readMore(), valid(), wait(), and write().

## writer

Writer wibble::sys::Pipe::writer

Referenced by close(), and write().

The documentation for this struct was generated from the following file:

- pipe.h