Purpose: Add an object/key combination

Return TypeFunction nameArguments
hzEcodehdbIndexEnum::Insert(uint32_t,hzAtom&,)

Declared in file: hzDatabase.h
Defined in file : hdbIndex.cpp

Function Logic:

0:START 1:val 2:unknown 3:Return E_RANGE 4:pS 5:unknown 6:Return hzerr(rc,(case key exists) Bitmap could not insert object) 7:Return rc

Function body:

hzEcode hdbIndexEnum::Insert (uint32_t objId)hzAtom& Key, 
{
   //  Purpose: Add an object/key combination
   //  
   //  Arguments: 1) objId The object id (row number)
   //     2) Key  The key
   //  
   //  Returns: E_RANGE If the supplied value is beyond the supported range of enum values.
   //     E_OK If the operation was successful.
   _hzfunc("hdbIndexEnum::Insert") ;
   hzIntset*   pS ;        //  Applicable bitmap to insert object id
   uint32_t    val ;       //  Enum value from supplied atom
   hzEcode     rc = E_OK ; //  Return code
   val = (uint32_t) Key ;
   if (val <&eq; 0|| val > m_Maps.Count())
       return E_RANGE ;
   pS = m_Maps[val] ;
   if ((rc = pS->Insert(objId)) != E_OK)
       return hzerr(rc, "(case key exists) Bitmap could not insert object") ;
   return rc ;
}