LOOKUP(CXXLB)

Shore Programmer's Manual - 2 August 96

NAME

lookup \- find object by pathname

SYNOPSIS

#include <ShoreApp.h>
static shrc Ref<T>::lookup(const char *path, REF(T) &returned_ref);

{
	const char *filename = argv[3];
	Ref<myInterfaceType>	obj;
	Ref<myInterfaceType>::lookup(filename, obj);
	if(obj) ...

	// or... using the SH_DO macros

	SH_DO(Ref<myInterfaceType>::lookup(filename,obj));
}

DESCRIPTION

Lookup returns a ref to the object referenced by path and stores the ref into returned_ref upon successful completion. Lookup checks the type of the referenced object, and verifies that it is actually of type T or one of its subtypes. If the object is not of an appropriate type, the effect is undefined.

Lookup must be called in a transaction.

VERSION

This manual page applies to Version 1.0 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-92-C-Q508.

COPYRIGHT

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

SEE ALSO

ref(cxxlb) , errors(oc) , transaction(oc)