|
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 (item item) |
| Return a string back to the pool. More... | |
Fixed-size atomic string pool.
| nSize | - pool size |
| bStringStartCapacity | - start string capacity for each string |
Definition at line 34 of file string_pool.h.
| string_pool< nSize, bStringStartCapacity >::item qx::string_pool< nSize, bStringStartCapacity >::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, bStringStartCapacity >::release | ( | item | item | ) |
Return a string back to the pool.
| item | - an item object to release. If nIndex == nFreeString, it is ignored. A string that isn't from this pool is acceptable. |
Definition at line 58 of file string_pool.inl.