#include <safestrings.h>
Public Member Functions | |
General Methods | |
| void | AppendString (const PString &newString, PBoolean splitString=PFalse) |
| void | AppendString (const char *newString, PBoolean splitString=PFalse) |
| PBoolean | GetNextString (PString &nextString) |
| PBoolean | IsEmpty () |
| PBoolean | StringsAvailable () |
| PString | GetFirstDeleteAll () |
| void | GetAllDeleteAll (PStringArray &res) |
Protected Attributes | |
| PMutex | accessMutex |
| PStringArray | data |
This class is thread safe.
| SafeStrings::SafeStrings | ( | ) |
Construct SafeStrings class
| SafeStrings::~SafeStrings | ( | ) |
Destructor
| SafeStrings::SafeStrings | ( | ) |
Construct SafeStrings class
| SafeStrings::~SafeStrings | ( | ) |
Destructor
| void SafeStrings::AppendString | ( | const PString & | newString, | |
| PBoolean | splitString = PFalse | |||
| ) |
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. |
| void SafeStrings::AppendString | ( | const char * | newString, | |
| PBoolean | splitString = PFalse | |||
| ) | [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. |
| PBoolean SafeStrings::GetNextString | ( | PString & | nextString | ) |
Remove the last string from this list, in a thread safe fashion. Return PTrue if succesfull
| nextString | resultant string. |
| PBoolean SafeStrings::IsEmpty | ( | ) |
Return True if this list is empty
| PBoolean 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
PMutex SafeStrings::accessMutex [protected] |
Lock on this string array
PStringArray SafeStrings::data [protected] |
Internal String array
1.5.1