#include <UnnamedPipe.hpp>
Inheritance diagram for BLOCXX_NAMESPACE::UnnamedPipe:

Public Types | |
| enum | EBlockingMode { E_NONBLOCKING, E_BLOCKING } |
| enum | EOpen { E_DONT_OPEN, E_OPEN } |
Public Member Functions | |
| virtual | ~UnnamedPipe () |
| int | writeInt (int value) |
| Write an int (native binary representation) to the pipe. | |
| int | writeString (const String &strData) |
| Writes a String to the pipe. | |
| int | readInt (int *value) |
| Reads an int (native binary representation) from the pipe. | |
| int | readString (String &strData) |
| Reads a String from the pipe. | |
| void | setReadTimeout (int seconds) |
| Sets the read timeout value. | |
| int | getReadTimeout () |
| Gets the read timeout value. | |
| void | setWriteTimeout (int seconds) |
| Sets the write timeout value. | |
| int | getWriteTimeout () |
| Gets the write timeout value. | |
| void | setTimeouts (int seconds) |
| Sets the read & write timeout values. | |
| String | readAll () |
| Read from the pipe and collect into a string, until the other end of the pipe is closed. | |
| virtual void | open ()=0 |
| Open the pipe. | |
| virtual int | close ()=0 |
| Close the pipe. | |
| virtual bool | isOpen () const =0 |
| Is the pipe open or closed? | |
| virtual Select_t | getWriteSelectObj () const =0 |
| Get a write select object. | |
| virtual void | setBlocking (EBlockingMode outputIsBlocking=E_BLOCKING)=0 |
| Set the pipe's blocking mode. | |
Static Public Member Functions | |
| static UnnamedPipeRef | createUnnamedPipe (EOpen doOpen=E_OPEN) |
| Create an instance of the concrete class that implements the UnnamedPipe interface. | |
Protected Member Functions | |
| UnnamedPipe () | |
Protected Attributes | |
| int | m_readTimeout |
| int | m_writeTimeout |
Blocking is enabled by default.
Definition at line 56 of file UnnamedPipe.hpp.
|
|
Definition at line 173 of file UnnamedPipe.hpp. |
|
|
Definition at line 186 of file UnnamedPipe.hpp. |
|
|
Definition at line 51 of file UnnamedPipe.cpp. |
|
|
Definition at line 199 of file UnnamedPipe.hpp. |
|
|
Close the pipe.
Implemented in BLOCXX_NAMESPACE::PosixUnnamedPipe. |
|
|
Create an instance of the concrete class that implements the UnnamedPipe interface.
Definition at line 207 of file PosixUnnamedPipe.cpp. Referenced by BLOCXX_NAMESPACE::Socket::createShutDownMechanism(). |
|
|
Gets the read timeout value. If blocking is enabled this is the number of seconds a read operation will block. Exception safety: No-throw
Definition at line 118 of file UnnamedPipe.hpp. |
|
|
Get a write select object.
Implemented in BLOCXX_NAMESPACE::PosixUnnamedPipe. |
|
|
Gets the write timeout value. If blocking is enabled this is the number of seconds a write operation will block. Exception safety: No-throw
Definition at line 132 of file UnnamedPipe.hpp. |
|
|
Is the pipe open or closed?
Implemented in BLOCXX_NAMESPACE::PosixUnnamedPipe. |
|
|
Open the pipe.
Implemented in BLOCXX_NAMESPACE::PosixUnnamedPipe. |
|
|
Read from the pipe and collect into a string, until the other end of the pipe is closed. Exception safety: Strong for the C++ instance. Fubared for the pipe. If an exception is thrown, the pipe won't be reset to it's pre-call state.
Definition at line 99 of file UnnamedPipe.cpp. References BLOCXX_NAMESPACE::IOIFC::read(), and BLOCXX_NAMESPACE::StringBuffer::releaseString(). |
|
|
Reads an int (native binary representation) from the pipe. If blocking is enabled, readInt() will block for up to getReadTimeout() seconds or forever if getReadTimeout() == -1. Exception safety: No-throw
Definition at line 74 of file UnnamedPipe.cpp. References BLOCXX_NAMESPACE::IOIFC::read(). |
|
|
Reads a String from the pipe. If blocking is enabled, readInt() will block for up to getReadTimeout() seconds or forever if getReadTimeout() == -1. Exception safety: Strong for the C++ instance. Fubared for the pipe. If an exception is thrown, the pipe won't be reset to it's pre-call state.
Definition at line 80 of file UnnamedPipe.cpp. References BLOCXX_NAMESPACE::String::E_TAKE_OWNERSHIP, BLOCXX_NAMESPACE::AutoPtrVec< X >::get(), and BLOCXX_NAMESPACE::AutoPtrVec< X >::release(). |
|
|
Set the pipe's blocking mode. Precondition: The pipe is open.
|
|
|
Sets the read timeout value. If blocking is enabled this is the number of seconds a read operation will block. Exception safety: No-throw
Definition at line 111 of file UnnamedPipe.hpp. |
|
|
Sets the read & write timeout values. If blocking is enabled this is the number of seconds a read or write operation will block. Exception safety: No-throw
Definition at line 139 of file UnnamedPipe.hpp. |
|
|
Sets the write timeout value. If blocking is enabled this is the number of seconds a write operation will block. Exception safety: No-throw
Definition at line 125 of file UnnamedPipe.hpp. |
|
|
Write an int (native binary representation) to the pipe. If blocking is enabled, writeInt() will block for up to getWriteTimeout() seconds or forever if getWriteTimeout() == -1. Exception safety: No-throw
Definition at line 56 of file UnnamedPipe.cpp. References BLOCXX_NAMESPACE::IOIFC::write(). |
|
|
Writes a String to the pipe. This should be read from the other side by readString. If blocking is enabled, writeString() will block for up to getWriteTimeout() seconds or forever if getWriteTimeout() == -1. Exception safety: No-throw
Definition at line 62 of file UnnamedPipe.cpp. References BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::String::length(), and BLOCXX_NAMESPACE::IOIFC::write(). |
|
|
Definition at line 202 of file UnnamedPipe.hpp. Referenced by BLOCXX_NAMESPACE::PosixUnnamedPipe::read(). |
|
|
Definition at line 203 of file UnnamedPipe.hpp. Referenced by BLOCXX_NAMESPACE::PosixUnnamedPipe::write(). |
1.4.6