|
CPN
Computational Process Networks
|
#include <D4RQueue.h>
Inheritance diagram for D4R::QueueBase:
Collaboration diagram for D4R::QueueBase:Public Member Functions | |
| QueueBase () | |
| virtual | ~QueueBase () |
| void | SetReaderNode (shared_ptr< Node > n) |
| void | SetWriterNode (shared_ptr< Node > n) |
| virtual void | Lock () const =0 |
| virtual void | Unlock () const =0 |
| void | SignalReaderTagChanged () |
| void | SignalWriterTagChanged () |
Protected Member Functions | |
| void | ReadBlock () |
| void | WriteBlock (unsigned qsize) |
| virtual bool | ReadBlocked ()=0 |
| virtual bool | WriteBlocked ()=0 |
| virtual void | Detect ()=0 |
| virtual void | UnlockedSignalReaderTagChanged () |
| virtual void | UnlockedSignalWriterTagChanged () |
| virtual void | Wait ()=0 |
| virtual void | Signal ()=0 |
Protected Attributes | |
| shared_ptr< Node > | reader |
| shared_ptr< Node > | writer |
| bool | readtagchanged |
| bool | writetagchanged |
| bool | incomm |
Private Member Functions | |
| QueueBase (const QueueBase &) | |
| QueueBase & | operator= (const QueueBase &) |
The base class for the D4R queue. This class provides methods for the queue to block and override.
Definition at line 39 of file D4RQueue.h.
| D4R::QueueBase::QueueBase | ( | ) |
Definition at line 51 of file D4RQueue.cc.
|
virtual |
|
private |
|
protectedpure virtual |
Called by the D4R algorithm when it has detected an artificial deadlock and this queue should be changed.
Implemented in CPN::QueueBase.
Referenced by WriteBlock().
Here is the caller graph for this function:
|
pure virtual |
These functions are to access the lock for the queue.
Implemented in CPN::QueueBase.
|
protected |
reader ===> writer ReadBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
| D4R::DeadlockException |
Definition at line 71 of file D4RQueue.cc.
References incomm, ReadBlocked(), reader, Signal(), Wait(), writer, and writetagchanged.
Referenced by CPN::QueueBase::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::QueueBase.
Referenced by ReadBlock().
Here is the caller graph for this function:| void D4R::QueueBase::SetReaderNode | ( | shared_ptr< Node > | n | ) |
Set the node which is reading from this queue
| n | the node |
Definition at line 59 of file D4RQueue.cc.
References reader, and Signal().
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:| void D4R::QueueBase::SetWriterNode | ( | shared_ptr< Node > | n | ) |
Set the node which is writing to this queue.
| n | the node |
Definition at line 65 of file D4RQueue.cc.
References Signal(), and writer.
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Signal that Wait should return
Implemented in CPN::QueueBase, and CPN::RemoteQueue.
Referenced by ReadBlock(), SetReaderNode(), SetWriterNode(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), and WriteBlock().
Here is the caller graph for this function:| void D4R::QueueBase::SignalReaderTagChanged | ( | ) |
These functions are called by the D4R::Node when thier tag changes.
Definition at line 139 of file D4RQueue.cc.
References UnlockedSignalReaderTagChanged().
Here is the call graph for this function:| void D4R::QueueBase::SignalWriterTagChanged | ( | ) |
Definition at line 150 of file D4RQueue.cc.
References UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
|
pure virtual |
Implemented in CPN::QueueBase.
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue.
Definition at line 144 of file D4RQueue.cc.
References DEBUG, reader, readtagchanged, Signal(), and writer.
Referenced by CPN::RemoteQueue::D4RTagPacket(), SignalReaderTagChanged(), and CPN::RemoteQueue::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue.
Definition at line 155 of file D4RQueue.cc.
References DEBUG, reader, Signal(), writer, and writetagchanged.
Referenced by CPN::RemoteQueue::D4RTagPacket(), SignalWriterTagChanged(), and CPN::RemoteQueue::UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Wait untill Signal is called. Must be holding the lock to call.
Implemented in CPN::QueueBase.
Referenced by ReadBlock(), and WriteBlock().
Here is the caller graph for this function:
|
protected |
writer ===> reader WriteBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
Definition at line 106 of file D4RQueue.cc.
References Detect(), incomm, reader, readtagchanged, Signal(), Wait(), WriteBlocked(), and writer.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), and CPN::QueueBase::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::QueueBase.
Referenced by WriteBlock().
Here is the caller graph for this function:
|
protected |
Definition at line 126 of file D4RQueue.h.
Referenced by ReadBlock(), and WriteBlock().
|
protected |
Definition at line 122 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), SetReaderNode(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), and WriteBlock().
|
protected |
Definition at line 124 of file D4RQueue.h.
Referenced by UnlockedSignalReaderTagChanged(), and WriteBlock().
|
protected |
Definition at line 123 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), SetWriterNode(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), and WriteBlock().
|
protected |
Definition at line 125 of file D4RQueue.h.
Referenced by ReadBlock(), and UnlockedSignalWriterTagChanged().
1.8.5