Add a member to the group with the given root name
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzNamering::AddMember | (hzString&,hzString&,) |
Declared in file: hzNamering.h
Defined in file : hzNamering.cpp
Function Logic:
Function body:
hzEcode hzNamering::AddMember (hzString& root)hzString& member,
{
// Add a member to the group with the given root name
//
// Arguments: 1) root The name of the root
// 2) member The name of the member
//
// Returns: E_ARGUMENT If either the group's root name or the new member name are blank
// E_OK If the member is added to the group
_hzfunc("hzNamering::AddMember") ;
if (!root || !member)
return E_ARGUMENT ;
mx->m_Lock.LockWrite() ;
if (!mx->m_Groups.Exists(root))
{
mx->m_Groups.Insert(root) ;
mx->m_Roots.Insert(root,root) ;
}
mx->m_Roots.Insert(member,root) ;
mx->m_Members.Insert(root,member) ;
mx->m_Lock.Unlock() ;
return E_OK ;
}