|
qxLib
|
Fixed-size atomic string pool. More...
#include <string_pool.h>
Classes | |
| struct | item |
Public Member Functions | |
| item | acquire () |
| Acquire a string from the pool. More... | |
| void | release (string sValue, int nIndex) |
| Return a string back to the pool. More... | |
Fixed-size atomic string pool.
| nSize | - pool size |
Definition at line 33 of file string_pool.h.
| string_pool< nSize >::item qx::string_pool< nSize >::acquire |
Acquire a string from the pool.
| - | If a free slot exists, returns it (moved) and its index, otherwise returns a fresh string with nIndex = nFreeString. |
Definition at line 33 of file string_pool.inl.
| void qx::string_pool< nSize >::release | ( | string | sValue, |
| int | nIndex | ||
| ) |
Return a string back to the pool.
If nIndex == nFreeString, it is ignored.
| sValue | - a string that does not necessarily have to be from this pool |
| nIndex | - an index of previously acquired string |
Definition at line 58 of file string_pool.inl.