#include <ShoreApp.h> shrc Ref<T>::get_loid(LOID &loid) const; shrc Ref<T>::get_primary_volid(VolId &volid) const;
Get_primary_volid stores the id of the volume on which the referenced object resides into volid. If the ref is nil, then the nil VolId (VolId::null) is returned. If the ref is invalid because its target was previously deleted, then the returned VolId will be that of the volume on which it used to reside.
An object's LOID can also be retrieved via Shore::stat (see stat(oc) ) or Ref<T>::ostat (see ostat(cxxlb) ), both of which return other information about the object in addition to its LOID. If only the LOID (VolId) is desired, then get_loid ( or get_primary_volid ) is preferable to Shore::stat or Ref<T>::ostat, as it usually does not require communication with the Shore server, where the two stat methods always communicate with the server.