#include <ShoreApp.h> const T *REF(T)::operator->() const
Operator-> is used to call methods on Shore objects. If the object referenced by the ref is not resident in the object cache then it is fetched from the Shore server. If the method is a "const" method, then an SH-mode (share-mode) lock is obtained on the object if it is not already locked in SH or a higher mode. If the method is not a "const" method, then the application must first call REF(T)::update (see update(oc) ) to inform Shore of its intent to modify the object.
If operator-> encounters any errors, then it calls the installed error handler. Applications can reduce the possibility of such errors using REF(T)::valid (see valid(oc) ) or REF(T)::fetch (see fetch(oc) ), to determine the validity of the ref before attempting to call a method on its target.
REF(Part) part; long partid; part = ...; partid = part->get_partid(); part.update()->set_partid(partid);"Get_partid" can be called directly if it is a "const" method. "Set_partid" requires a call to update to notify Shore of the application's intent to modify the object.