[#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, if the `original` is parsed, and otherwise having a state such that parsing command‐line arguments results in the same value as parsing the same command‐line arguments with the `original`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `original` is valid (i.e., `original.isValid()` returns `true`). [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`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `specTable` satisfies the `isValidOptionSpecificationTable` function. Note that an appropriate error message is written to `bsl::cerr`. [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`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `specTable` satisfies the `isValidOptionSpecificationTable` function. Note that an appropriate error message is written to `bsl::cerr`. Also note that `specTable` need not be statically initialized. [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`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `specTable` satisfies the `isValidOptionSpecificationTable` function. Note that an appropriate error message is written to the specified `errorStream`. [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`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `specTable` satisfies the `isValidOptionSpecificationTable` function. Note that an appropriate error message is written to the specified `errorStream`. Also note that `specTable` need not be statically initialized. [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..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#