(C) 1998 AROS - The Amiga Research OS


NAME
#include <utility/name.h>
#include <proto/utility.h>

struct NamedObject * FindNamedObject (nameSpace , name , lastObject)

LOCATION
In UtilityBase at offset 40

SYNOPSIS
struct NamedObject * nameSpace
STRPTR name
struct NamedObject * lastObject

FUNCTION
This function will search through a given NameSpace, or the system global NameSpace to find a NamedObject with the name requested. Optionally you can have the search start from a specific NamedObject. This way you can look for each occurence of a specifically named NamedObject in a NameSpace that allows for duplicates.

INPUTS
nameSpace
The NameSpace to search through. If NULL will use the system default NameSpace.
name
The name of the object to search for. If NULL, any and all NamedObjects will be matched.
lastObject
The (optional) last NamedObject to start the search from.

RESULT
If a NamedObject with the name supplied exists, it will be returned. Otherwise will return NULL.

When you have finised with this NamedObject, you should call ReleaseNamedObject( NamedObject ).

EXAMPLE

SEE ALSO
ReleaseNamedObject()

NOTES
If you are going to use a returned NamedObject to be the starting point for another search you must call ReleaseNamedObject() AFTER searching, as the ReleaseNamedObject() call can cause the NamedObject to be freed, leaving you with an invalid pointer.

BUGS

INTERNALS
Could we implement named objects with hash chains perhaps? Possibly not as then NextObject handling would be quite tricky.

HISTORY
20.10.1998 hkiel
Amiga Research OS
20.08.1997 digulla
Polish.

Renamed utility_intern.h to intern.h.

10.02.1997 digulla
Added cast
09.02.1997 iaint
Fixed some nasty bugs in NamedObjects
27.01.1997 digulla
Added #include <proto/exec.h>
27.01.1997 ldp
Polish
18.12.1996 iaint
NamedObjects