[#BloombergLP-bdlcc-ObjectCatalog-replace-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/ObjectCatalog.adoc[ObjectCatalog]::replace
:relfileprefix: ../../../
:mrdocs:

Replace the object with the specified `handle` with movable `newObject`&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;objectcatalog&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
replace(
    int handle,
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;TYPE&gt;] newObject);
----

== Description

Replace the object having the specified `handle` with the specified `newObject`, leaving `newObject` in an unspecified but valid state&period; Return 0 on success, and a non&hyphen;zero value if the handle is not contained in this catalog&period;

== Return Value

0 on success, and a non&hyphen;zero value if not found

== Parameters

[cols="1,4"]
|===
| Name| Description
| *handle*
| handle of the object to replace
| *newObject*
| replacement value
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
