botsense/bsProxy/bsProxyMod.c
BsModRsrcTbl_T *ModCbRsrcTblNew(int nMaxResources)
{
  BsModRsrcTbl_T *pRsrcTbl = NEW(BsModRsrcTbl_T);

  pRsrcTbl->m_vecRsrc = new(sizeof(void *) * (size_t)nMaxResources);

  memset(pRsrcTbl->m_vecIndex, BSPROXY_VCONN_UNDEF,
      sizeof(pRsrcTbl->m_vecIndex));

  pRsrcTbl->m_uMaxResources = (uint_t)nMaxResources;
  pRsrcTbl->m_uInUseCount   = 0;

  return pRsrcTbl;
}
/*!
 * \brief Allocatae a new module resource table of fixed size.
 *
 * The resource table is indexed by the virtual connection handle.
 *
 * \param nMaxResources   Maximum number of simultaneous resources supported.
 *
 * \return Pointer to allocated resource block.
 */
\brief Allocatae a new module resource table of fixed size.
The resource table is indexed by the virtual connection handle.

\param nMaxResources   Maximum number of simultaneous resources supported.

\return Pointer to allocated resource block.
\ brief Allocatae a new module resource table of fixed size . The resource table is indexed by the virtual connection handle . \ param nMaxResources Maximum number of simultaneous resources supported . \ return Pointer to allocated resource block .
BsModRsrcTbl_T *ModCbRsrcTblNew(int nMaxResources)
{
  BsModRsrcTbl_T *pRsrcTbl = NEW(BsModRsrcTbl_T);
  pRsrcTbl->m_vecRsrc = new(sizeof(void *) * (size_t)nMaxResources);
  memset(pRsrcTbl->m_vecIndex, BSPROXY_VCONN_UNDEF,
      sizeof(pRsrcTbl->m_vecIndex));
  pRsrcTbl->m_uMaxResources = (uint_t)nMaxResources;
  pRsrcTbl->m_uInUseCount   = 0;
  return pRsrcTbl;
}
BsModRsrcTbl_T * ModCbRsrcTblNew ( int nMaxResources ) { BsModRsrcTbl_T * pRsrcTbl = NEW ( BsModRsrcTbl_T ) ; pRsrcTbl -> m_vecRsrc = new ( sizeof ( void * ) * ( size_t ) nMaxResources ) ; memset ( pRsrcTbl -> m_vecIndex , BSPROXY_VCONN_UNDEF , sizeof ( pRsrcTbl -> m_vecIndex ) ) ; pRsrcTbl -> m_uMaxResources = ( uint_t ) nMaxResources ; pRsrcTbl -> m_uInUseCount = 0 ; return pRsrcTbl ; }
\brief Allocatae a new module resource table of fixed size.
\ brief Allocatae a new module resource table of fixed size .