[#BloombergLP-bslstl-Function_Rep] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Function_Rep :relfileprefix: ../../ :mrdocs: This is a component‐private class. Do not use. == Synopsis Declared in `<bslstl_function_rep.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Function_Rep; ---- == Description This class provides a non‐template representation for a `bsl::function` instance. It handles all of the object‐management parts of `bsl::function` that are not specific to the prototype (argument list and return type), e.g., storing, copying, and moving the `function` object, but not invoking the `function` (which requires knowledge of the prototype). These management methods are run‐time polymorphic, and therefore do not require that this class be a template (although several of the member functions are templates). == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Function_Rep/GenericInvoker.adoc[`GenericInvoker`] | A "generic" function type analogous to the data type `void` (though without the language support provided by `void`). | xref:BloombergLP/bslstl/Function_Rep/allocator_type.adoc[`allocator_type`] | Alias for the allocator type held for allocator‐aware clients. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Function_Rep/2constructor.adoc[`Function_Rep`] [.small]#[constructor]# | Create an empty object using the specified `allocator` to supply memory. | xref:BloombergLP/bslstl/Function_Rep/2destructor.adoc[`~Function_Rep`] [.small]#[destructor]# | Destroy this object and deallocate any non‐inplace target storage. | xref:BloombergLP/bslstl/Function_Rep/copyInit.adoc[`copyInit`] | Copy‐initialize this rep from the specified `original` rep. | xref:BloombergLP/bslstl/Function_Rep/get_allocator.adoc[`get_allocator`] | Return the allocator used to supply memory for this object. | xref:BloombergLP/bslstl/Function_Rep/installFunc.adoc[`installFunc`] | Install `func` as the target and set the invoker, or leave empty. | 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. | xref:BloombergLP/bslstl/Function_Rep/isEmpty.adoc[`isEmpty`] | Return `true` if `invoker()` is a null pointer, indicating that this object has no target object. | xref:BloombergLP/bslstl/Function_Rep/isInplace.adoc[`isInplace`] | Return `true` if the target is allocated in place within the small‐object buffer of this object; otherwise return `false`. | xref:BloombergLP/bslstl/Function_Rep/makeEmpty.adoc[`makeEmpty`] | Make this object empty without changing its allocator. | xref:BloombergLP/bslstl/Function_Rep/moveInit.adoc[`moveInit`] | Move‐initialize this rep from the rep at the specified `from`. | xref:BloombergLP/bslstl/Function_Rep/swap.adoc[`swap`] | Exchange this object's target, manager, and invoker with `other`. | xref:BloombergLP/bslstl/Function_Rep/target.adoc[`target`] | Return a modifiable pointer to the target if its type is `TP`. | xref:BloombergLP/bslstl/Function_Rep/targetRaw.adoc[`targetRaw`] | Return a modifiable pointer to this object's target. | xref:BloombergLP/bslstl/Function_Rep/target_type.adoc[`target_type`] | Return the `type_info` for the current target, or `typeid(void)`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#