Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

IpcQ Class Reference

An Ipc message queue container. More...

#include <sipc.h>

List of all members.

Public Member Functions

char * shove (char *textIn, size_t textLen, int *rlen)
 Fill the buffer from input data and return the leftovers.

int pop (char cmd[IPCBUFSIZE])
 Get buffered text and place it in cmd.

bool IsEmpty ()
 Is the buffer empty or no?

void empty ()
 Empty the buffer.


Protected Member Functions

char * qPush (char *text, char *sep, int *rlen)

Private Attributes

IpcQelfirstEls
IpcQellastEls


Detailed Description

An Ipc message queue container.

These objects are used to hold line buffers read from an IPC channel.

Definition at line 87 of file sipc.h.


Member Function Documentation

void IpcQ::empty  )  [inline]
 

Empty the buffer.

Postcondition:
The buffer contains no items.

Definition at line 208 of file sipc.h.

References pop().

Referenced by IpcType::freeCon().

bool IpcQ::IsEmpty  )  [inline]
 

Is the buffer empty or no?

Returns:
False if the buffer contains any text, not-false if the buffer contains text.

Definition at line 197 of file sipc.h.

int IpcQ::pop char  cmd[IPCBUFSIZE]  )  [inline]
 

Get buffered text and place it in cmd.

Parameters:
Buffer to place text in
Returns:
1 if a cmd has been loaded with a buffered item, 0 if there is no text in the buffer.
Precondition:
Cmd is a memory area of type char [] with a size of at least #IPCBUFSIZE bytes.
Postcondition:
If an item is buffered for processing, then the text of the next item will fill cmd, and be removed from the buffer.

Definition at line 161 of file sipc.h.

Referenced by empty(), and IpcType::pollAndHandle().

char* IpcQ::shove char *  textIn,
size_t  textLen,
int *  rlen
[inline]
 

Fill the buffer from input data and return the leftovers.

Parameters:
textIn Text to buffer for processing
textLen Length of the text (in bytes)
Returns:
An offset of textIn after which no text is buffered.
Precondition:
textIn points to a character array of size textLen.
Postcondition:
Each substring ending with a \n inside #textIn is now in a buffer element, and buffer elements are in the order in which text was input. If the array returned is empty then all text has been buffered, else that which has not been buffered is contained.

Definition at line 138 of file sipc.h.

Referenced by IpcType::ReadPackets().


The documentation for this class was generated from the following file:
Generated at Sat Oct 25 20:56:13 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.