[#BloombergLP-balber-BerEncoder-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerEncoder.adoc[BerEncoder]::BerEncoder
:relfileprefix: ../../../
:mrdocs:

Construct an encoder object&period;

== Synopsis

Declared in `&lt;balber&lowbar;berencoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
BerEncoder(
    xref:BloombergLP/balber/BerEncoderOptions.adoc[BerEncoderOptions] const* options = 0,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Optionally specify encoder `options`&period; If `options` is 0, `BerEncoderOptions()` is used&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *options*
| optional encoder options (0 for defaults)
| *basicAllocator*
| memory allocator (0 for the default allocator)
|===


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