1 #ifndef CONNECT_SERVICES__COMPOUND_ID_IMPL__HPP
2 #define CONNECT_SERVICES__COMPOUND_ID_IMPL__HPP
87 template <
typename Link>
99 return static_cast<Link*
>(entry);
190 template <
typename Poolable,
typename FieldTypeOrIDClass>
207 Poolable* element =
m_Head;
208 m_Head = element->m_NextObjectInPool;
217 element->m_NextObjectInPool =
m_Head;
223 Poolable* element =
m_Head;
224 while (element !=
NULL) {
225 Poolable* next_element = element->m_NextObjectInPool;
227 element = next_element;
259 extern void g_PackID(
void* binary_id,
size_t binary_id_len,
string& packed_id);
261 extern bool g_UnpackID(
const string& packed_id,
string& binary_id);
Pool of recycled CCompoundID objects.
Base64-encoded ID string that contains extractable typed fields.
Declarations of CCompoundIDPool, CCompoundID, and CCompoundIDField.
void g_PackID(void *binary_id, size_t binary_id_len, string &packed_id)
SFieldList< SSameTypeListLink > THomogeneousFieldList
bool g_UnpackID(const string &packed_id, string &binary_id)
SFieldList< SNeighborListLink > TFieldList
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
TValue GetRand(void)
Get the next random number in the interval [0..GetMax()] (inclusive)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Multi-threading – mutexes; rw-locks; semaphore.
ECompoundIDFieldType m_Type
struct SCompoundIDFieldImpl::@1006::@1008 m_IPv4SockAddr
SCompoundIDFieldImpl * m_NextObjectInPool
virtual void DeleteThis()
Virtual method "deleting" this object.
void Reset(SCompoundIDPoolImpl *pool, ECompoundIDClass id_class)
virtual void DeleteThis()
Virtual method "deleting" this object.
void Remove(SCompoundIDFieldImpl *field)
THomogeneousFieldList m_HomogeneousFields[eCIT_NumberOfTypes]
SCompoundIDFieldImpl * AppendField(ECompoundIDFieldType field_type)
SCompoundIDImpl * m_NextObjectInPool
void ReturnToPool(Poolable *element)
CFastMutex m_RandomGenMutex
SCompoundIDObjectPool< SCompoundIDImpl, ECompoundIDClass > m_CompoundIDPool
CCompoundID UnpackV0(const string &packed_id)
SCompoundIDObjectPool< SCompoundIDFieldImpl, ECompoundIDFieldType > m_FieldPool
SCompoundIDFieldImpl * m_Next
SCompoundIDFieldImpl * m_Prev
void Remove(SCompoundIDFieldImpl *entry)
static void SetPrev(SCompoundIDFieldImpl *entry, SCompoundIDFieldImpl *prev)
static void SetNext(SCompoundIDFieldImpl *entry, SCompoundIDFieldImpl *next)
SCompoundIDFieldImpl * m_Tail
static SCompoundIDFieldImpl * GetPrev(SCompoundIDFieldImpl *entry)
void Append(SCompoundIDFieldImpl *new_entry)
SCompoundIDFieldImpl * m_Head
static SCompoundIDFieldImpl * GetNext(SCompoundIDFieldImpl *entry)
static Link * GetLink(SCompoundIDFieldImpl *entry)