Esempio n. 1
0
/* GetSRAPath
 *  retrieve a reference to SRAPath object in use - may be NULL
 * UseSRAPath
 *  provide an SRAPath object for use - attaches a new reference
 */
LIB_EXPORT rc_t CC SRAMgrGetSRAPath ( const SRAMgr *self,
        SRAPath **path )
{
    rc_t rc;

    if ( path == NULL )
        rc = RC ( rcSRA, rcMgr, rcAccessing, rcParam, rcNull );
    else
    {
        if ( self == NULL )
            rc = RC ( rcSRA, rcMgr, rcAccessing, rcSelf, rcNull );
#if OLD_SRAPATH_MGR
        else if ( self -> _pmgr == NULL )
            rc = 0;
        else
        {
            rc = SRAPathAddRef ( self -> _pmgr );
            if ( rc == 0 )
            {
                * path = self -> _pmgr;
                return 0;
            }
        }
#else
        else
#endif

        * path = NULL;
    }
Esempio n. 2
0
 /* AddRef
  * Release
  */
 inline rc_t AddRef () const  throw()
 {
     return SRAPathAddRef ( this );
 }