Reserve the user type name and set an access code mask for that user type.
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdsApp::AddUserType | (hzString&,) |
Declared in file: hzDissemino.h
Defined in file : hdsCore.cpp
Function Logic:
Function body:
hzEcode hdsApp::AddUserType (hzString& utname)
{
// Category: Dissemino System Initialization
//
// Reserve the user type name and set an access code mask for that user type.
//
// Argument: utname The user type name
//
// Returns: E_DUPLICATE If the user type name has already been added to the collection of known user types for the application (m_UserTypes).
// E_OK If the new user type name is added and the aceess mask set.
_hzfunc("hdsApp::AddUserType") ;
uint32_t utype ; // User type
uint32_t x ; // Indexes iterator
if (m_UserTypes.Exists(utname))
return E_DUPLICATE ;
// Set use access code
utype = 1;
for (x = 0; x < m_UserTypes.Count() ; x++)
utype *= 2;
m_UserTypes.Insert(utname, utype) ;
m_pLog->Out("Added USER TYPE %s access %d\n", *utname, utype) ;
return E_OK ;
}