Create an object accepting the command‐line options described by the specified specTable of the specified length.

Synopsis

Declared in <balcl_commandline.h>

CommandLine(
    OptionInfo const* specTable,
    int length,
    std::ostream& errorStream,
    bslma::Allocator* basicAllocator = 0);

Description

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.

Parameters

Name

Description

specTable

option specification table

length

number of entries in specTable

errorStream

stream to which construction errors are written

basicAllocator

memory allocator (or 0 for the default)

Created with MrDocs