SafeStrings Class Reference

#include <safestrings.h>

List of all members.

Public Member Functions

General Methods
void AppendString (const PString &newString, BOOL splitString=FALSE)
void AppendString (const char *newString, BOOL splitString=FALSE)
BOOL GetNextString (PString &nextString)
BOOL IsEmpty ()
BOOL StringsAvailable ()
PString GetFirstDeleteAll ()
void GetAllDeleteAll (PStringArray &res)

Protected Attributes

PMutex accessMutex
PStringArray data


Detailed Description

This class is used to manage a list of strings in a thread safe fashion.

This class is thread safe.


Constructor & Destructor Documentation

SafeStrings::SafeStrings (  ) 

Construct SafeStrings class

SafeStrings::~SafeStrings (  ) 

Destructor

SafeStrings::SafeStrings (  ) 

Construct SafeStrings class

SafeStrings::~SafeStrings (  ) 

Destructor


Member Function Documentation

void SafeStrings::AppendString ( const PString &  newString,
BOOL  splitString = FALSE 
)

Add a new string to the list, in a thread safe fashion.

Parameters:
newString  String to add to the list.
splitString  If True, the string is added to the list, character by character.

void SafeStrings::AppendString ( const char *  newString,
BOOL  splitString = FALSE 
) [inline]

Add a new string to the list, in a thread safe fashion.

Parameters:
newString  String to add to the list.
splitString  If True, the string is added to the list, character by character.

BOOL SafeStrings::GetNextString ( PString &  nextString  ) 

Remove the last string from this list, in a thread safe fashion. Return TRUE if succesfull

Parameters:
nextString  resultant string.

BOOL SafeStrings::IsEmpty (  ) 

Return True if this list is empty

BOOL SafeStrings::StringsAvailable (  )  [inline]

Return True if there is data ready to be read from the list

PString SafeStrings::GetFirstDeleteAll (  ) 

Return the first string on list, and then delete all elements on the list

void SafeStrings::GetAllDeleteAll ( PStringArray &  res  ) 

Return the contents of this string array


Member Data Documentation

PMutex SafeStrings::accessMutex [protected]

Lock on this string array

PStringArray SafeStrings::data [protected]

Internal String array


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:34:07 2008 for OPAL by  doxygen 1.5.1