(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/utility.h>

BOOL AddNamedObject (nameSpace , object)

LOCATION
In UtilityBase at offset 37

SYNOPSIS
struct NamedObject * nameSpace
struct NamedObject * object

FUNCTION
Adds a given NamedObject to a NameSpace which is addressed through a second NamedObject. Allows you to link a common group of NamedObjects together. If the NameSpace doesn't support duplicate names, then a search for a duplicate will be made, and FALSE returned if one is found.

INPUTS
nameSpace
The NameSpace to add the NamedObject object to. If this value is NULL, then the NamedObject will be added to the root NameSpace. This is useful for sharing NamedObjects between Tasks.
object
The NamedObject to add to the NameSpace.

RESULT
If the NamedObject can be added to either the supplied NameSpace or the system global NameSpace, this function will return TRUE.

Otherwise it will return FALSE. This will generally happen when the NSF_NODUPS flag is set and this NamedObject has the same name as a second object, or when the object is already in a NameSpace.

EXAMPLE

SEE ALSO
utility/name.h, RemNamedObject()

NOTES
See BUGS.

BUGS
Although the AmigaOS 3.1 autodocs did not say so, under 3.0 you couldn't add a NamedObject to a NameSpace when the NamedObject you were adding had a NameSpace itself. This has changed. This is because the autodocs did not say this, and they are right :)

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
20.08.1997 digulla
Polish.

Renamed utility_intern.h to intern.h.

27.01.1997 digulla
Added #include <proto/exec.h>
27.01.1997 ldp
Polish
18.12.1996 iaint
NamedObjects