OPAL
Version 3.18.8
|
#include <safestrings.h>
Inherits PObject.
Public Member Functions | |
Construction/Destruction | |
SafeStrings () | |
~SafeStrings () | |
General Methods | |
void | AppendString (const PString &newString, PBoolean splitString=false) |
void | AppendString (const char *newString, PBoolean splitString=false) |
PBoolean | GetNextString (PString &nextString) |
PBoolean | IsEmpty () |
PBoolean | StringsAvailable () |
PString | GetFirstDeleteAll () |
void | GetAllDeleteAll (PStringArray &res) |
Protected Member Functions | |
PDECLARE_MUTEX (accessMutex) | |
Protected Attributes | |
PStringArray | data |
This class is used to manage a list of strings in a thread safe fashion.
This class is thread safe.
SafeStrings::SafeStrings | ( | ) |
Construct SafeStrings class
SafeStrings::~SafeStrings | ( | ) |
Destructor
void SafeStrings::AppendString | ( | const PString & | newString, |
PBoolean | splitString = false |
||
) |
Add a new string to the list, in a thread safe fashion.
newString | String to add to the list. |
splitString | If True, the string is added to the list, character by character. |
Referenced by AppendString().
|
inline |
Add a new string to the list, in a thread safe fashion.
newString | String to add to the list. |
splitString | If True, the string is added to the list, character by character. |
References AppendString().
void SafeStrings::GetAllDeleteAll | ( | PStringArray & | res | ) |
Return the contents of this string array
PString SafeStrings::GetFirstDeleteAll | ( | ) |
Return the first string on list, and then delete all elements on the list
PBoolean SafeStrings::GetNextString | ( | PString & | nextString | ) |
Remove the last string from this list, in a thread safe fashion. Return true if succesfull
nextString | resultant string. |
PBoolean SafeStrings::IsEmpty | ( | ) |
Return True if this list is empty
Referenced by StringsAvailable().
|
protected |
Lock on this string array
|
inline |
Return True if there is data ready to be read from the list
References IsEmpty().
|
protected |
Internal String array