UPDATE(OC)

Shore Programmer's Manual - 3 November 94

NAME

update \- mark object dirty

SYNOPSIS

#include <ShoreApp.h>
T *REF(T)::update() const

DESCRIPTION

Update informs Shore of an application's intent to modify a Shore object. In particular, it obtains an EX (exclusive-mode) lock on the object if such a lock is not already held by the current transaction. Update must be called before any non-"const" method of the object is called. If the application fails to call update on an object before calling a non-"const" method, then the compiler will flag the method call as an error.

If update encounters any errors, it calls the installed error handler. Applications can reduce the possibility of such errors by using REF(T)::fetch (see fetch(oc) ) or REF(T)::valid valid(oc) ) to obtain an exclusive lock before calling update.

EXAMPLE

The following code fragment shows how update is used when calling a method of a Shore object.
REF(Part) part;
int partid;

part = ...
partid = ...
part.update()->set_partid(partid);

VERSION

This manual page applies to Version 0.1 of theShore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.

COPYRIGHT

Copyright (c) 1994 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

ref(oc) , fetch(oc) , method(oc) , valid(oc) .