Locate all members of a supplied root.
| Return Type | Function name | Arguments |
|---|---|---|
| uint32_t | hzNamering::MemberLocate | (hzVect<hzString>&,hzString&,) |
Declared in file: hzNamering.h
Defined in file : hzNamering.cpp
Function Logic:
Function body:
uint32_t hzNamering::MemberLocate (hzVect<hzString>& results)hzString& root,
{
// Locate all members of a supplied root.
//
// Arguments: 1) results A vector of strings to be populated by the operation. These will be members of the supplied root.
// 2) root The supplied root.
//
// Returns: Number of members found.
_hzfunc("hzNamering::MemberLocate") ;
hzString S ; // Target string
uint32_t nPos ; // First name group found
uint32_t nLo = 0; // First matching member found in root
uint32_t nHi = 0; // Last matching member found in root
results.Clear() ;
if (!root)
return -1;
mx->m_Lock.LockWrite() ;
nLo = mx->m_Members.First(root) ;
if (nLo >&eq; 0)
{
nHi = mx->m_Members.Last(root) ;
for (nPos = nLo ; nPos <&eq; nHi ; nPos++)
{
S = mx->m_Members.GetObj(nPos) ;
results.Add(S) ;
}
}
mx->m_Lock.Unlock() ;
return results.Count() ;
}