#include <MemoryGate.h>
Public Member Functions | |
MemoryGate () | |
MemoryGate (unsigned fifoSize) | |
~MemoryGate () | |
bool | sendBuffer (Buffer buff, unsigned n) |
template<typename T> | |
bool | sendObject (T *obj) |
template<typename T> | |
bool | sendArray (T *obj) |
void | signalServer () |
void | deallocBuffer (void *buff, unsigned n) |
template<typename T> | |
void | deallocObject (T *obj) |
template<typename T> | |
void | deallocArray (T *obj) |
void | disconnect () |
bool | isConnected () const |
void | _respondToServerSeverance () |
Private Types | |
typedef void * | Buffer |
typedef Overflow_Template< MemoryMessage > | Overflow |
Raised when an operation could not complete because of no room available in some queue. | |
Private Member Functions | |
template<typename T> | |
void | _raiseError (T const &err) const |
bool | _sendMessage (MemoryMessage const &msg) |
bool | _sendMessageAndSignal (MemoryMessage const &msg) |
Private Attributes | |
Atomic< bool > | _serverConnected |
boost::shared_ptr< MessagePort< MemoryMessage > > | _memoryOut |
Friends | |
class | MemoryDeallocServer |
Classes | |
class | ServerRemover |
|
|
|
Raised when an operation could not complete because of no room available in some queue.
|
|
|
|
|
|
|
|
_raiseError Processes an error, and throws it by default. You may specialize this function for std::exception to 'override' the default implementation, and handle errors in a more efficient, or more verbose way.
|
|
_respondToServerSeverance Reacts to a server shutdown message, by clearing it's input and output fifo's and sending any remaining buffers to _deallocateLateBuffer(). |
|
_sendMessage Sends a message to the server.
|
|
_sendMessage Sends a message to the server and signals it's semaphore.
|
|
deallocArray Sends an array of objects to the MemoryDeallocServer to be destroyed.
|
|
deallocBuffer Deallocates the buffer 'buff' with n bytes.
|
|
deallocObject Sends an object to the MemoryDeallocServer to be destroyed.
|
|
disconnect Sends a disconnection request to the connected server and returns immediatly. If the request is fulfilled then isConnected() will return false after an indeterminate amount of time. Note that since shared references to the communication ports are used, you can safely delete this gate immediatly after calling disconnect() successfully (please check errors!). |
|
isConnected
|
|
sendArray Sends an array of objects to the server to be destroyed.
|
|
sendBuffer Sends a buffer to the server to be deallocated.
|
|
sendObject Sends an object to the server to be destroyed.
|
|
notifyServer Tickles the servers semaphore, to notify of pending returns. Note that this function does NOT check if this gate is connected to a server. |
|
|
|
|
|
|