My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::PipeQueue Class Reference

#include <PipeQueue.h>

Inheritance diagram for gcp::util::PipeQueue:
gcp::util::Pipe

Classes

class  MsgQueue
 
class  QueueNode
 

Public Member Functions

 PipeQueue ()
 
 ~PipeQueue ()
 
PipeState write (void *buffer, size_t nbyte, long timeout=PIPE_NOWAIT)
 
PipeState read (void *buffer, size_t nbyte, long timeout=PIPE_NOWAIT)
 
- Public Member Functions inherited from gcp::util::Pipe
 Pipe ()
 
virtual ~Pipe ()
 
virtual void readPipe (void *buffer, size_t nbyte, long timeout)
 
virtual void writePipe (void *buffer, size_t nbyte, long timeout)
 
int fd ()
 
fd_set rfds ()
 
int readFd ()
 
int writeFd ()
 

Public Attributes

Mutex queueGuard_
 
MsgQueue messages_
 

Additional Inherited Members

- Protected Member Functions inherited from gcp::util::Pipe
void getTimeOfDay (struct timespec *ts)
 
- Protected Attributes inherited from gcp::util::Pipe
pthread_mutex_t guard_
 
bool guardIsReady_
 
PipeFd readfd_
 
PipeFd writefd_
 
char unread_ [PIPE_BUF]
 
size_t nread_
 

Detailed Description

A class to encapsulate a pipe

Constructor & Destructor Documentation

PipeQueue::PipeQueue ( )

Constructor.

Exceptions
Exception....................................................................... PipeQueue constructor function
PipeQueue::~PipeQueue ( )

Destructor.

Exceptions
Exception....................................................................... PipeQueue destructor function

Member Function Documentation

PipeState PipeQueue::read ( void *  buffer,
size_t  nbyte,
long  timeout = PIPE_NOWAIT 
)
virtual

Read from the pipe.

Exceptions
Exception....................................................................... Read from the PipeQueue. This should only be called after select() has returned because new data are available.

Reimplemented from gcp::util::Pipe.

PipeState PipeQueue::write ( void *  buffer,
size_t  nbyte,
long  timeout = PIPE_NOWAIT 
)
virtual

Write to the pipe.

Exceptions
Exception....................................................................... Write a new message to the PipeQueue

Reimplemented from gcp::util::Pipe.


The documentation for this class was generated from the following files: