[#BloombergLP-bslstl-Function_Rep]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Function&lowbar;Rep
:relfileprefix: ../../
:mrdocs:

This is a component&hyphen;private class&period; Do not use&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;function&lowbar;rep&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Function&lowbar;Rep;
----

== Description

This class provides a non&hyphen;template representation for a `bsl&colon;&colon;function` instance&period; It handles all of the object&hyphen;management parts of `bsl&colon;&colon;function` that are not specific to the prototype (argument list and return type), e&period;g&period;, storing, copying, and moving the `function` object, but not invoking the `function` (which requires knowledge of the prototype)&period; These management methods are run&hyphen;time polymorphic, and therefore do not require that this class be a template (although several of the member functions are templates)&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Function_Rep/GenericInvoker.adoc[`GenericInvoker`] 
| A &quot;generic&quot; function type analogous to the data type `void` (though without the language support provided by `void`)&period;
| xref:BloombergLP/bslstl/Function_Rep/allocator_type.adoc[`allocator&lowbar;type`] 
| Alias for the allocator type held for allocator&hyphen;aware clients&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Function_Rep/2constructor.adoc[`Function&lowbar;Rep`]         [.small]#[constructor]#
| Create an empty object using the specified `allocator` to supply memory&period;
| xref:BloombergLP/bslstl/Function_Rep/2destructor.adoc[`&#126;Function&lowbar;Rep`] [.small]#[destructor]#
| Destroy this object and deallocate any non&hyphen;inplace target storage&period;
| xref:BloombergLP/bslstl/Function_Rep/copyInit.adoc[`copyInit`] 
| Copy&hyphen;initialize this rep from the specified `original` rep&period;
| xref:BloombergLP/bslstl/Function_Rep/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used to supply memory for this object&period;
| xref:BloombergLP/bslstl/Function_Rep/installFunc.adoc[`installFunc`] 
| Install `func` as the target and set the invoker, or leave empty&period;
| xref:BloombergLP/bslstl/Function_Rep/invoker.adoc[`invoker`] 
| Return a pointer the invoker function set using `installFunc` or a null pointer if this object is empty&period;
| xref:BloombergLP/bslstl/Function_Rep/isEmpty.adoc[`isEmpty`] 
| Return `true` if `invoker()` is a null pointer, indicating that this object has no target object&period;
| xref:BloombergLP/bslstl/Function_Rep/isInplace.adoc[`isInplace`] 
| Return `true` if the target is allocated in place within the small&hyphen;object buffer of this object&semi; otherwise return `false`&period;
| xref:BloombergLP/bslstl/Function_Rep/makeEmpty.adoc[`makeEmpty`] 
| Make this object empty without changing its allocator&period;
| xref:BloombergLP/bslstl/Function_Rep/moveInit.adoc[`moveInit`] 
| Move&hyphen;initialize this rep from the rep at the specified `from`&period;
| xref:BloombergLP/bslstl/Function_Rep/swap.adoc[`swap`] 
| Exchange this object&apos;s target, manager, and invoker with `other`&period;
| xref:BloombergLP/bslstl/Function_Rep/target.adoc[`target`] 
| Return a modifiable pointer to the target if its type is `TP`&period;
| xref:BloombergLP/bslstl/Function_Rep/targetRaw.adoc[`targetRaw`] 
| Return a modifiable pointer to this object&apos;s target&period;
| xref:BloombergLP/bslstl/Function_Rep/target_type.adoc[`target&lowbar;type`] 
| Return the `type&lowbar;info` for the current target, or `typeid(void)`&period;
|===



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