[#BloombergLP-balcl-CommandLine-2constructor-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/CommandLine.adoc[CommandLine]::CommandLine :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<balcl_commandline.h>` Create a command‐line object having the value of the specified `original` command line. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balcl/CommandLine/2constructor-0a.adoc[CommandLine]( xref:BloombergLP/balcl/CommandLine.adoc[CommandLine] const& original, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-0a.adoc[_» more..._]# Same as the overload taking `const OptionInfo (&)[LENGTH]`, but accepts a non‐const `specTable` whose entries may be updated in place. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int LENGTH> explicit xref:BloombergLP/balcl/CommandLine/2constructor-05.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo](& specTable)[], xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-05.adoc[_» more..._]# Create an object accepting the command‐line options described by the specified (statically‐initialized) `specTable`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int LENGTH> explicit xref:BloombergLP/balcl/CommandLine/2constructor-02.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo] const(& specTable)[], xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-02.adoc[_» more..._]# Create an object accepting the command‐line options described by the specified `specTable` of the specified `length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balcl/CommandLine/2constructor-0d.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo] const* specTable, int length, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-0d.adoc[_» more..._]# Same as the preceding overload, but accepts a non‐const `specTable` whose entries may be updated in place. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int LENGTH> xref:BloombergLP/balcl/CommandLine/2constructor-0f.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo](& specTable)[], std::ostream& errorStream, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-0f.adoc[_» more..._]# Create an object accepting the command‐line options described by the specified (statically‐initialized) `specTable`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int LENGTH> xref:BloombergLP/balcl/CommandLine/2constructor-07.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo] const(& specTable)[], std::ostream& errorStream, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-07.adoc[_» more..._]# Create an object accepting the command‐line options described by the specified `specTable` of the specified `length`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balcl/CommandLine/2constructor-00.adoc[CommandLine]( xref:BloombergLP/balcl/OptionInfo.adoc[OptionInfo] const* specTable, int length, std::ostream& errorStream, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balcl/CommandLine/2constructor-00.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *original* | command‐line object to copy | *basicAllocator* | memory allocator (or 0 for the default) | *specTable* | option specification table (may be updated in place) | *length* | number of entries in `specTable` | *errorStream* | stream to which construction errors are written |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#