NCBI C++ ToolKit
|
Classes | |
class | CArgException |
CArgException –. More... | |
class | CArgHelpException |
CArgHelpException –. More... | |
class | CArgValue |
CArgValue –. More... | |
class | CArgs |
CArgs –. More... | |
class | CArgErrorHandler |
CArgErrorHandler –. More... | |
class | CArgDescriptions |
CArgDescriptions –. More... | |
struct | CArgDescriptions::SArgDependency |
class | CArgDescriptions::CPrintUsage |
class | CArgDescriptions::CPrintUsageXml |
class | CCommandArgDescriptions |
CCommandArgDescriptions –. More... | |
class | CArgAllow |
CArgAllow –. More... | |
class | CArgAllow_Symbols |
CArgAllow_Symbols –. More... | |
class | CArgAllow_String |
CArgAllow_String –. More... | |
class | CArgAllow_Strings |
CArgAllow_Strings –. More... | |
class | CArgAllow_Int8s |
CArgAllow_Int8s –. More... | |
class | CArgAllow_Integers |
CArgAllow_Integers –. More... | |
class | CArgAllow_Doubles |
CArgAllow_Doubles –. More... | |
class | CArgDesc |
CArgDesc –. More... | |
class | CArgDependencyGroup |
class | CArgAllow_Regexp |
CArgAllow_Regexp –. More... | |
Friends | |
class | CArgValue::CArgs |
class | CArgValue::CArgDescDefault |
class | CArgValue::CArgDescMandatory |
class | CArgValue::CArgDesc_Flag |
class | CArgs::CCommandArgDescriptions |
class | CArgDescriptions::CCommandArgDescriptions |
|
private |
Argument groups.
Definition at line 1118 of file ncbiargs.hpp.
|
private |
Type for arguments.
Definition at line 480 of file ncbiargs.hpp.
|
private |
Argument descr. type.
Definition at line 1113 of file ncbiargs.hpp.
|
private |
Type for const iterator.
Definition at line 482 of file ncbiargs.hpp.
|
private |
Const arguments iterator.
Definition at line 1115 of file ncbiargs.hpp.
|
private |
Type for iterator.
Definition at line 481 of file ncbiargs.hpp.
|
private |
Arguments iterator.
Definition at line 1114 of file ncbiargs.hpp.
typedef unsigned int CArgValue::TArgValueFlags |
Bitwise OR of "EArgValueFlags".
Definition at line 315 of file ncbiargs.hpp.
typedef unsigned int CCommandArgDescriptions::TCommandArgFlags |
Bitwise OR of ECommandArgFlags.
Definition at line 1390 of file ncbiargs.hpp.
|
private |
Definition at line 1129 of file ncbiargs.hpp.
|
private |
Definition at line 1130 of file ncbiargs.hpp.
|
private |
Definition at line 1456 of file ncbiargs.hpp.
typedef unsigned int CArgValue::TFileFlags |
Bitwise OR of "EFileFlags".
Definition at line 270 of file ncbiargs.hpp.
typedef unsigned int CArgDescriptions::TFlags |
Bitwise OR of "EFlags".
Definition at line 676 of file ncbiargs.hpp.
typedef int CArgDescriptions::THideStdArgs |
Binary OR of "EHideStdArgs".
Definition at line 1074 of file ncbiargs.hpp.
|
protected |
Definition at line 1733 of file ncbiargs.hpp.
|
protected |
Definition at line 1807 of file ncbiargs.hpp.
|
private |
List of flag arguments.
Definition at line 1117 of file ncbiargs.hpp.
typedef int CArgDescriptions::TMiscFlags |
Bitwise OR of "EMiscFlags".
Definition at line 1036 of file ncbiargs.hpp.
|
private |
Positional arg. vector.
Definition at line 1116 of file ncbiargs.hpp.
typedef vector<string> CArgValue::TStringArray |
Some values types can contain several value lists.
Example: CGIs pass list selections by repeating the same name
Definition at line 293 of file ncbiargs.hpp.
|
protected |
Type of the container that contains the allowed string values.
Definition at line 1688 of file ncbiargs.hpp.
|
protected |
Definition at line 1580 of file ncbiargs.hpp.
Processing of positional arguments.
In strict mode any value starting with '-' is treated as a key/flag unless any positional arguments have already been found (e.g. after '–' argument). In loose mode any argument is treated as positional if it can not be processed as a valid key or flag.
Enumerator | |
---|---|
ePositionalMode_Strict | Strict mode (default) |
ePositionalMode_Loose | Loose mode. |
Definition at line 576 of file ncbiargs.hpp.
Type of CArgDescriptions For a CGI application positional arguments and flags does not make sense (this syntax cannot be expressed by CGI protocol)
Enumerator | |
---|---|
eRegularArgs | Regular application. |
eCgiArgs | CGI application. |
Definition at line 559 of file ncbiargs.hpp.
Whether the argument:
Enumerator | |
---|---|
fArgValue_HasDefault | Has default value. |
fArgValue_FromDefault | Not provided in command line. |
Definition at line 311 of file ncbiargs.hpp.
Definition at line 1384 of file ncbiargs.hpp.
Enumerator | |
---|---|
eDefault | |
eHidden | Hide command in Usage. |
Definition at line 1409 of file ncbiargs.hpp.
Flag to invert constraint logically.
Enumerator | |
---|---|
eConstraintInvert | Logical NOT. |
eConstraint | Constraint is not inverted (taken as is) |
Definition at line 922 of file ncbiargs.hpp.
Dependencies between arguments.
Enumerator | |
---|---|
eRequires | One argument requires another. |
eExcludes | One argument excludes another. |
Definition at line 955 of file ncbiargs.hpp.
Error types for improperly formatted arguments.
These error conditions are checked for and caught when processing arguments.
Definition at line 126 of file ncbiargs.hpp.
Error type for help exception.
Definition at line 161 of file ncbiargs.hpp.
Definition at line 262 of file ncbiargs.hpp.
Additional flags, the first group is file related flags.
Must match the argument type, or an exception will be thrown. ( File related are for eInputFile and eOutputFiler argument types.)
Definition at line 614 of file ncbiargs.hpp.
Define how flag presence affect CArgValue::HasValue().
Enumerator | |
---|---|
eFlagHasValueIfMissed | |
eFlagHasValueIfSet |
Definition at line 749 of file ncbiargs.hpp.
Which standard flag's descriptions should not be displayed in the usage message.
Do not display descriptions of the standard flags such as the -h, -logfile, -conffile, -version flags in the usage message. Note that you still can pass them in the command line.
Definition at line 1063 of file ncbiargs.hpp.
Control whether the "setting" of this particular member marks the whole group as "set" regardless of the value passed to SetMinMembers()
Enumerator | |
---|---|
eNoInstantSet | |
eInstantSet |
Definition at line 1935 of file ncbiargs.hpp.
Miscellaneous flags.
Definition at line 1027 of file ncbiargs.hpp.
|
private |
Enumerator | |
---|---|
eCreateArgs | called by CreateArgs() |
eConvertKeys | called by ConvertKeys() |
Definition at line 1218 of file ncbiargs.hpp.
Symbol class for defining sets of characters.
Symbol character classes patterned after those defined in <ctype.h>.
Definition at line 1540 of file ncbiargs.hpp.
Available argument types.
Definition at line 588 of file ncbiargs.hpp.
CArgDependencyGroup & CArgDependencyGroup::Add | ( | CArgDependencyGroup * | dep_group, |
EInstantSet | instant_set = eNoInstantSet |
||
) |
Make another dependency group a member of this dependency group.
instant_set | "eInstantSet" means that if the added group ("dep_group") is set, then the SetMinMembers() condition doesn't apply anymore. |
Definition at line 4932 of file ncbiargs.cpp.
References CArgDependencyGroup::m_Groups.
Add new argument name and value.
Throw an exception if the "name" is not an empty string, and if there is an argument with this name already and "update" parameter is not set.
HINT: Use empty "name" to add extra (unnamed) args, and they will be automagically assigned with the virtual names: "#1", "#2", "#3", etc.
arg | argument value added to the collection |
update | when TRUE and argument already exists it will be replaced when FALSE throws an exception |
add_value | when TRUE and argument already exists the value is added to the string list (multiple argument) |
Definition at line 1917 of file ncbiargs.cpp.
References _ASSERT, CArgValue::AsString(), set< Key, Compare >::end(), CArgValue::GetName(), set< Key, Compare >::insert(), CArgs::m_Args, CArgValue::m_Name, CArgs::m_nExtra, NCBI_THROW, CArgs::Remove(), s_ComposeNameExtra(), CArgValue::SetOrdinalPosition(), CArgValue::SetStringList(), set< Key, Compare >::size(), CArgDescriptions::VerifyName(), and CArgs::x_Find().
Referenced by CArgDescriptions::x_PostCheck().
CArgDependencyGroup & CArgDependencyGroup::Add | ( | const string & | arg_name, |
EInstantSet | instant_set = eNoInstantSet |
||
) |
Make a regular argument a member of this dependency group.
An argument with this name will need to be added separately using CArgDescriptions::AddXXX().
arg_name | Name of the argument, as specified in CArgDescriptions::AddXXX() |
instant_set | "eInstantSet" means that if the added argument ("arg_name") is set, then the SetMinMembers() condition doesn't apply anymore. |
Definition at line 4926 of file ncbiargs.cpp.
References CArgDependencyGroup::m_Arguments.
Add argument alias.
The alias can be used in the command line instead of the original argument. Accessing argument value by its alias is not allowed (will be reported as an unknown argument). The alias will be printed in USAGE after the original argument name.
alias | New alias for a real argument. |
arg_name | The real argument's name. |
Definition at line 2557 of file ncbiargs.cpp.
References kEmptyStr, and CArgDescriptions::x_AddDesc().
Referenced by s_AddLatencyOptions(), CPsgClientApp::s_InitRequest(), CGappedArgs::SetArgumentDescriptions(), and CInputStreamSource::SetStandardInputArgs().
void CCommandArgDescriptions::AddCommand | ( | const string & | cmd, |
CArgDescriptions * | description, | ||
const string & | alias = kEmptyStr , |
||
ECommandFlags | flags = eDefault |
||
) |
Add command argument descriptions.
cmd | Command string |
description | Argument description |
alias | Alternative name of the command |
flags | Optional flags |
Definition at line 4015 of file ncbiargs.cpp.
References cmd, command, CArgDescriptions::Delete(), CCommandArgDescriptions::eHidden, map_checker< Container >::erase(), CArgDescriptions::Exist(), flags, kEmptyStr, CCommandArgDescriptions::m_Aliases, CArgDescriptions::m_AutoHelp, CCommandArgDescriptions::m_Commands, CCommandArgDescriptions::m_CurrentCmdGroup, CCommandArgDescriptions::m_Description, CCommandArgDescriptions::m_Groups, CArgDescriptions::m_HasHidden, NCBI_THROW, s_AutoHelp, s_AutoHelpFull, s_AutoHelpShowAll, s_AutoHelpXml, CCommandArgDescriptions::SetCurrentCommandGroup(), and NStr::TruncateSpaces().
void CArgDescriptions::CPrintUsage::AddCommandDescription | ( | list< string > & | arr, |
const string & | cmd, | ||
const map< string, string > * | aliases, | ||
size_t | max_cmd_len, | ||
bool | detailed | ||
) | const |
Definition at line 3709 of file ncbiargs.cpp.
References a, arr, cmd, map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, and string.
Referenced by CCommandArgDescriptions::PrintUsage().
Add logfile and conffile arguments.
Definition at line 2229 of file ncbiargs.cpp.
References CArgDescriptions::AddDefaultKey(), CArgDescriptions::AddOptionalKey(), CArgDescriptions::eInputFile, CArgDescriptions::eOutputFile, CArgDescriptions::Exist(), s_ArgCfgFile, and s_ArgLogFile.
void CArgDescriptions::AddDefaultKey | ( | const string & | name, |
const string & | synopsis, | ||
const string & | comment, | ||
EType | type, | ||
const string & | default_value, | ||
TFlags | flags = 0 , |
||
const string & | env_var = kEmptyStr , |
||
const char * | display_value = nullptr |
||
) |
Add description for optional key with default value.
Optional key with default value has the following syntax:
arg_key_dflt := [-<key>
]
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument key |
synopsis | Synopsis for argument |
comment | Argument description |
type | Argument type |
default_value | Default value |
flags | Optional flags |
env_var | Optional name of environment variable that contains default value |
display_value | Default value shown in Usage |
Definition at line 2441 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CArgDescriptions::AddDefaultFileArguments(), CWinMaskConfig::AddWinMaskArgs(), CSdbapiTest::Init(), CAVApp::Init(), CId2FetchApp::Init(), CSdbapiSimpleApp::Init(), CDbapiTestSpeedApp::InitSample(), s_InitPsgOptions(), CPsgClientApp::s_InitRequest(), CStdCmdLineArgs::SetArgumentDescriptions(), CTaskCmdLineArgs::SetArgumentDescriptions(), COffDiagonalRangeArg::SetArgumentDescriptions(), CRMBlastNArg::SetArgumentDescriptions(), CGenericSearchArgs::SetArgumentDescriptions(), CFilteringArgs::SetArgumentDescriptions(), CCompositionBasedStatsArgs::SetArgumentDescriptions(), CLargestIntronSizeArgs::SetArgumentDescriptions(), CGeneticCodeArgs::SetArgumentDescriptions(), CGapTriggerArgs::SetArgumentDescriptions(), CPssmEngineArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CKBlastpArgs::SetArgumentDescriptions(), CDeltaBlastArgs::SetArgumentDescriptions(), CMappingArgs::SetArgumentDescriptions(), CQueryOptionsArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CIgBlastArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CMTArgs::SetArgumentDescriptions(), CMbIndexArgs::SetArgumentDescriptions(), CSRASearchModeArgs::SetArgumentDescriptions(), CMapperGenericSearchArgs::SetArgumentDescriptions(), CMapperNuclArgs::SetArgumentDescriptions(), CMapperLargestIntronSizeArgs::SetArgumentDescriptions(), CInputStreamSource::SetStandardInputArgs(), CAdvancedAlignCleanup::SetupArgDescriptions(), CSplignArgUtil::SetupArgDescriptions(), CAlignCollapser::SetupArgDescriptions(), CGnomonAnnotatorArgUtil::SetupArgDescriptions(), CChainerArgUtil::SetupArgDescriptions(), CMultAlign::SetupArgDescriptions(), CCompartOptions::SetupArgDescriptions(), CProSplignOptions_Base::SetupArgDescriptions(), CProSplignScoring::SetupArgDescriptions(), CProSplignOutputOptions::SetupArgDescriptions(), CDBLBClientApp::x_InitLookup(), CDBLBClientApp::x_InitWhereIs(), and CTbl2AsnApp::x_SetAlnArgs().
void CArgDescriptions::AddDefaultPositional | ( | const string & | name, |
const string & | comment, | ||
EType | type, | ||
const string & | default_value, | ||
TFlags | flags = 0 , |
||
const string & | env_var = kEmptyStr , |
||
const char * | display_value = nullptr |
||
) |
Add description for optional positional argument with default value.
Optional positional argument with default value has the following syntax:
arg_pos_dflt := [
]
Will throw exception CArgException if:
name | Name of argument |
comment | Argument description |
type | Argument type |
default_value | Default value |
flags | Optional flags |
env_var | Optional name of environment variable that contains default value |
display_value | Default value shown in Usage |
Definition at line 2511 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
void CArgDescriptions::AddDependencyGroup | ( | CArgDependencyGroup * | dep_group | ) |
Add a dependency group.
The argument constraints specified by the dependency group(s) will be processed only after all regular dependencies for arguments and dependency groups have been processed.
Definition at line 2586 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), and CArgDescriptions::m_DependencyGroups.
Definition at line 3696 of file ncbiargs.cpp.
References arr, and s_PrintCommentBody().
Referenced by CArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsage().
void CArgDescriptions::CPrintUsage::AddDetails | ( | list< string > & | arr | ) | const |
Definition at line 3732 of file ncbiargs.cpp.
References arr, NStr::fWrap_Hyphenate, i, kEmptyStr, kMax_UInt, s_IsFlag(), s_IsOptional(), s_PrintCommentBody(), string, NStr::UIntToString(), and NStr::Wrap().
Referenced by CArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsage().
void CArgDescriptions::AddExtra | ( | unsigned | n_mandatory, |
unsigned | n_optional, | ||
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description for the extra, unnamed positional arguments.
The name of this description is always an empty string. Names of the resulting arg.values will be: "#1", "#2", ... By default, no extra args are allowed.
To allow an unlimited # of optional argumens pass "n_optional" = kMax_UInt.
Will throw exception CArgException if:
n_mandatory | Number of mandatory args |
n_optional | Number of optional args |
comment | Argument description |
type | Argument type |
flags | Optional flags |
Definition at line 2528 of file ncbiargs.cpp.
References flags, kEmptyStr, CArgDescriptions::m_nExtra, CArgDescriptions::m_nExtraOpt, NCBI_THROW, and CArgDescriptions::x_AddDesc().
Referenced by CPsgClientApp::s_InitRequest().
void CArgDescriptions::AddFlag | ( | const string & | name, |
const string & | comment, | ||
CBoolEnum< EFlagValue > | set_value = eFlagHasValueIfSet , |
||
TFlags | flags = 0 |
||
) |
Add description for flag argument.
Flag argument has the following syntax:
arg_flag := -<flag>, <flag> := "name"
If argument "set_value" is eFlagHasValueIfSet (TRUE), then:
Setting argument "set_value" to FALSE will reverse the above meaning.
NOTE: If CArgValue::HasValue() is TRUE, then AsBoolean() is always TRUE.
name | Name of argument |
comment | Argument description |
flags | Optional flags |
Definition at line 2459 of file ncbiargs.cpp.
References CArgDescriptions::eFlagHasValueIfSet, flags, and CArgDescriptions::x_AddDesc().
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CLocalTaxon::AddArguments(), CArgDescriptions::AddStdArguments(), CWinMaskConfig::AddWinMaskArgs(), COMSSA::AppInit(), CArgDescriptions::CArgDescriptions(), CAVApp::Init(), SUApp::Init(), Cn3DNoWin::Init(), CId2FetchApp::Init(), CNcbiTestApplication::Init(), s_AddLatencyOptions(), s_CommandlessInit(), s_InitDataFlags(), s_InitDataOnly(), s_InitPsgOptions(), CPsgClientApp::s_InitRequest(), CStdCmdLineArgs::SetArgumentDescriptions(), CRMBlastNArg::SetArgumentDescriptions(), CNuclArgs::SetArgumentDescriptions(), CCompositionBasedStatsArgs::SetArgumentDescriptions(), CGappedArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CDeltaBlastArgs::SetArgumentDescriptions(), CQueryOptionsArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CIgBlastArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CRemoteArgs::SetArgumentDescriptions(), CDebugArgs::SetArgumentDescriptions(), CHspFilteringArgs::SetArgumentDescriptions(), CSRASearchModeArgs::SetArgumentDescriptions(), CMapperGenericSearchArgs::SetArgumentDescriptions(), CAdvancedAlignCleanup::SetupArgDescriptions(), CAlignCollapser::SetupArgDescriptions(), CGnomonAnnotatorArgUtil::SetupArgDescriptions(), CChainerArgUtil::SetupArgDescriptions(), CGridWorkerApp::SetupArgDescriptions(), CProSplignOptions_Base::SetupArgDescriptions(), CProSplignOutputOptions::SetupArgDescriptions(), CDBLBClientApp::x_InitLookup(), and CDBLBClientApp::x_InitWhereIs().
void CArgDescriptions::AddKey | ( | const string & | name, |
const string & | synopsis, | ||
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description for mandatory key.
Mandatory key has the syntax:
arg_key := -<key>
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument key |
synopsis | Synopsis for argument |
comment | Argument description |
type | Argument type |
flags | Optional flags |
Definition at line 2411 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by CWinMaskConfig::AddWinMaskArgs(), CAVApp::Init(), SUApp::Init(), Cn3DNoWin::Init(), CPsgClientApp::s_InitRequest(), CTaskCmdLineArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CInputStreamSource::SetStandardInputArgs(), CGnomonAnnotatorArgUtil::SetupArgDescriptions(), CChainerArgUtil::SetupArgDescriptions(), and CDBLBClientApp::x_InitLookup().
void CArgDescriptions::AddNegatedFlagAlias | ( | const string & | alias, |
const string & | arg_name, | ||
const string & | comment = kEmptyStr |
||
) |
Add negated alias for a flag argument.
Using the alias in the command line produces the same effect as using the original flag with the opposite value. If 'arg_name' does not describe a flag argument, an exception is thrown.
Definition at line 2568 of file ncbiargs.cpp.
References set< Key, Compare >::end(), CArgDescriptions::m_Args, NCBI_THROW, orig, s_IsFlag(), CArgDescriptions::x_AddDesc(), and CArgDescriptions::x_Find().
void CArgDescriptions::AddOpening | ( | const string & | name, |
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description of mandatory opening positional argument.
Mandatory opening argument has the following syntax: arg_pos :=
NOTE: In command line, mandatory opening arguments must go first, before any other arguments; their order is defined by the order in which they were described and added into CArgDescriptions.
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument |
comment | Argument description |
type | Argument type |
flags | Optional flags |
Definition at line 2484 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by s_InitCreate(), and s_InitPost().
void CArgDescriptions::AddOptionalKey | ( | const string & | name, |
const string & | synopsis, | ||
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description for optional key without default value.
Optional key without default value has the following syntax:
arg_key_opt := [-<key>
]
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument key |
synopsis | Synopsis for argument |
comment | Argument description |
type | Argument type |
flags | Optional flags |
Definition at line 2426 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CGenomicCollectionsService::AddArguments(), CLocalTaxon::AddArguments(), CArgDescriptions::AddDefaultFileArguments(), CArgDescriptions::AddStdArguments(), CWinMaskConfig::AddWinMaskArgs(), SUApp::Init(), Cn3DNoWin::Init(), CId2FetchApp::Init(), CNcbiTestApplication::Init(), CDbapiTestSpeedApp::InitSample(), CLangQueryApp::InitSample(), s_InitDataOnly(), s_InitPost(), s_InitPsgOptions(), CPsgClientApp::s_InitRequest(), CStdCmdLineArgs::SetArgumentDescriptions(), CWindowSizeArg::SetArgumentDescriptions(), CWordThresholdArg::SetArgumentDescriptions(), CMatrixNameArg::SetArgumentDescriptions(), CGenericSearchArgs::SetArgumentDescriptions(), CFilteringArgs::SetArgumentDescriptions(), CNuclArgs::SetArgumentDescriptions(), CDiscontiguousMegablastArgs::SetArgumentDescriptions(), CGappedArgs::SetArgumentDescriptions(), CFrameShiftArgs::SetArgumentDescriptions(), CSearchStrategyArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CPhiBlastArgs::SetArgumentDescriptions(), CMappingArgs::SetArgumentDescriptions(), CQueryOptionsArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CIgBlastArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CHspFilteringArgs::SetArgumentDescriptions(), CMbIndexArgs::SetArgumentDescriptions(), CMapperStdCmdLineArgs::SetArgumentDescriptions(), CInputStreamSource::SetStandardInputArgs(), CAdvancedAlignCleanup::SetupArgDescriptions(), CSplignArgUtil::SetupArgDescriptions(), CChainerArgUtil::SetupArgDescriptions(), CGridWorkerApp::SetupArgDescriptions(), CRemoteCgiApp::SetupArgDescriptions(), CDBLBClientApp::x_InitLookup(), and CTbl2AsnApp::x_SetAlnArgs().
void CArgDescriptions::AddOptionalPositional | ( | const string & | name, |
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description for optional positional argument without default value.
Optional positional argument, without default value has the following syntax:
arg_pos_opt := [
]
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument |
comment | Argument descr. |
type | Argument type |
flags | Optional flags |
Definition at line 2497 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by s_InitQuery(), and CPsgClientApp::s_InitRequest().
void CArgDescriptions::AddPositional | ( | const string & | name, |
const string & | comment, | ||
EType | type, | ||
TFlags | flags = 0 |
||
) |
Add description for mandatory positional argument.
Mandatory positional argument has the following syntax:
arg_pos :=
NOTE: For all types of positional arguments:
Will throw exception CArgException if:
Any argument can be later referenced using its unique name "name".
name | Name of argument |
comment | Argument description |
type | Argument type |
flags | Optional flags |
Definition at line 2471 of file ncbiargs.cpp.
References flags, and CArgDescriptions::x_AddDesc().
Referenced by CAVApp::Init(), CSdbapiSimpleApp::Init(), s_CommandlessInit(), s_InitPost(), CPsgClientApp::s_InitRequest(), CDBLBClientApp::x_InitWhatIs(), and CDBLBClientApp::x_InitWhereIs().
|
virtual |
Add standard arguments.
Reimplemented in CCommandArgDescriptions.
Definition at line 2253 of file ncbiargs.cpp.
References CArgDescriptions::AddFlag(), CArgDescriptions::AddOptionalKey(), CArgDescriptions::Delete(), CArgDescriptions::eInputFile, CArgDescriptions::eOutputFile, CArgDescriptions::Exist(), CArgDescriptions::fHideConffile, CArgDescriptions::fHideDryRun, CArgDescriptions::fHideFullHelp, CArgDescriptions::fHideFullVersion, CArgDescriptions::fHideHelp, CArgDescriptions::fHideLogfile, CArgDescriptions::fHideVersion, CArgDescriptions::fHideXmlHelp, CArgDescriptions::m_AutoHelp, CArgDescriptions::m_HasHidden, mask, s_ArgCfgFile, s_ArgDryRun, s_ArgFullVersion, s_ArgFullVersionJson, s_ArgFullVersionXml, s_ArgLogFile, s_ArgVersion, s_AutoHelp, s_AutoHelpFull, s_AutoHelpShowAll, and s_AutoHelpXml.
Referenced by CCommandArgDescriptions::AddStdArguments().
|
virtual |
Add standard arguments.
Reimplemented from CArgDescriptions.
Definition at line 4121 of file ncbiargs.cpp.
References CArgDescriptions::AddStdArguments(), CArgDescriptions::fHideConffile, CArgDescriptions::fHideDryRun, CArgDescriptions::fHideLogfile, CCommandArgDescriptions::m_Description, CArgDescriptions::m_HasHidden, mask, t, and CCommandArgDescriptions::x_IsCommandMandatory().
void CArgDescriptions::CPrintUsage::AddSynopsis | ( | list< string > & | arr, |
const string & | intro, | ||
const string & | prefix | ||
) | const |
Definition at line 3660 of file ncbiargs.cpp.
References arr, CArgDescriptions::eCgiArgs, CArgDescSynopsis::GetSynopsis(), s_IsFlag(), s_IsOpening(), s_IsOptional(), s_IsPositional(), and NStr::WrapList().
Referenced by CArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsage().
CArgAllow_Symbols & CArgAllow_Symbols::Allow | ( | const string & | symbol_set | ) |
Definition at line 4495 of file ncbiargs.cpp.
References CArgAllow_Symbols::eUser, set< Key, Compare >::insert(), and CArgAllow_Symbols::m_SymClass.
CArgAllow_Strings * CArgAllow_Strings::Allow | ( | const string & | value | ) |
Add allowed string values.
value | String to add to the set of allowed string values |
Definition at line 4598 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), CArgAllow_Strings::m_Strings, and rapidjson::value.
Referenced by CWinMaskConfig::AddWinMaskArgs(), CArgAllow_Strings::AllowValue(), CAppHitFilter::Init(), CAppNWA::Init(), CSplignApp::Init(), CPrimeCacheApplication::Init(), CConvert2BlastMaskApplication::Init(), CDustMaskApplication::Init(), SegMaskerApplication::Init(), CHttpSessionApp::Init(), NCBITEST_INIT_CMDLINE(), and CSplignArgUtil::SetupArgDescriptions().
CArgAllow_Doubles & CArgAllow_Doubles::Allow | ( | double | value | ) |
Definition at line 4880 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), CArgAllow_Doubles::m_MinMax, and rapidjson::value.
Referenced by CArgAllow_Doubles::CArgAllow_Doubles().
CArgAllow_Symbols & CArgAllow_Symbols::Allow | ( | CArgAllow_Symbols::ESymbolClass | symbol_class | ) |
Add allowed symbols.
Definition at line 4489 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), kEmptyStr, and CArgAllow_Symbols::m_SymClass.
Referenced by CArgAllow_Symbols::CArgAllow_Symbols().
CArgAllow_Int8s & CArgAllow_Int8s::Allow | ( | Int8 | value | ) |
Definition at line 4749 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), CArgAllow_Int8s::m_MinMax, and rapidjson::value.
Referenced by CArgAllow_Int8s::CArgAllow_Int8s().
CArgAllow_Doubles & CArgAllow_Doubles::AllowRange | ( | double | from, |
double | to | ||
) |
Add allowed values.
Definition at line 4874 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), and CArgAllow_Doubles::m_MinMax.
Referenced by CArgAllow_Doubles::CArgAllow_Doubles().
CArgAllow_Int8s & CArgAllow_Int8s::AllowRange | ( | Int8 | from, |
Int8 | to | ||
) |
Add allow values.
Definition at line 4743 of file ncbiargs.cpp.
References set< Key, Compare >::insert(), and CArgAllow_Int8s::m_MinMax.
Referenced by CArgAllow_Int8s::CArgAllow_Int8s().
CArgAllow_Strings & CArgAllow_Strings::AllowValue | ( | const string & | value | ) |
Add allowed string values.
value | String to add to the set of allowed string values |
Definition at line 4656 of file ncbiargs.cpp.
References CArgAllow_Strings::Allow(), and rapidjson::value.
Referenced by CArgAllow_Strings::operator,().
|
pure virtual |
Get the argument's boolean value.
If you request a wrong value type, such as a call to "AsBoolean()" for a "integer" argument, an exception is thrown.
NOTE: Do not confuse HasValue(), operator bool() and AsBoolean(). The former two methods check if the argument has any value, they do not return its actual value.
Implemented in CArg_Boolean, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Get the argument as a DateTime.
Implemented in CArg_String, CArg_ExcludedValue, CArg_NoValue, and CArg_DateTime.
Get the argument as a directory.
Implemented in CArg_String, CArg_ExcludedValue, CArg_NoValue, and CArg_Dir.
|
pure virtual |
Get the argument's double value.
If you request a wrong value type, such as a call to "AsDouble()" for a "boolean" argument, an exception is thrown.
Implemented in CArg_Double, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
|
pure virtual |
Get the argument as an input file stream.
Implemented in CArg_Ios, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Referenced by CDataTool::GenerateCode(), and CSplignApp::x_ReadFastaSetId().
|
pure virtual |
Get the argument's integer (8-byte long) value.
If you request a wrong value type, such as a call to "AsInt8()" for a "boolean" argument, an exception is thrown. This will however work okay for "plain integer" argument.
Implemented in CArg_DataSize, CArg_Int8, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
|
pure virtual |
Get the argument's integer value.
If you request a wrong value type, such as a call to "AsInteger()" for a "boolean" or even "Int8" argument, an exception is thrown.
Implemented in CArg_IntId, CArg_Integer, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Referenced by CProjBulderApp::ParseArguments().
|
pure virtual |
Get the argument's value as an integer id (TIntId).
The actual value is Int4 or Int8 depending on the NCBI_INT8_GI definition.
If you request a wrong value type, such as a call to "AsIntId()" for a "boolean", an exception is thrown. Calling AsIntId() on an integer argument is always allowed. For an Int8 argument it will throw an exception if NCBI_INT8_GI is not defined.
Implemented in CArg_IntId, CArg_Integer, CArg_Int8, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
|
pure virtual |
Get the argument as a file stream.
Implemented in CArg_Ios, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
|
pure virtual |
Get the argument as an output file stream.
Implemented in CArg_Ios, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Copy contents of another object into this one.
Definition at line 1770 of file ncbiargs.cpp.
References CArgs::m_Args, CArgs::m_Command, and CArgs::m_nExtra.
Referenced by CArgs::CArgs(), CCgiApplication::InitArgs(), CInputStreamSource::InitArgs(), CArgs::operator=(), and CXcompareAnnotsApplication::Run().
Get the argument's string value.
If it is a value of a flag argument, then return either "true" or "false".
Implemented in CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Referenced by CArgs::Add(), ArgToSeq_id(), CCodeGenerator::GetOpt(), CProjBulderApp::ParseArguments(), CArgs::Print(), CAsn2Asn::RunAsn2Asn(), CMakeBlastDBApp::x_ProcessMaskData(), and CSplignApp::x_ReadFastaSetId().
|
inlineprotected |
Definition at line 1515 of file ncbiargs.hpp.
CArgAllow_Doubles::CArgAllow_Doubles | ( | double | x_min, |
double | x_max | ||
) |
Constructor specifying range of allowed double values.
Definition at line 4814 of file ncbiargs.cpp.
References CArgAllow_Doubles::AllowRange().
CArgAllow_Doubles::CArgAllow_Doubles | ( | double | x_value | ) |
Constructor specifying an allowed double value.
Definition at line 4808 of file ncbiargs.cpp.
References CArgAllow_Doubles::Allow().
|
inlineprotected |
Definition at line 1803 of file ncbiargs.hpp.
Referenced by CArgAllow_Doubles::Clone().
Constructor specifying range of allowed integer values.
Definition at line 4679 of file ncbiargs.cpp.
References CArgAllow_Int8s::AllowRange().
CArgAllow_Int8s::CArgAllow_Int8s | ( | Int8 | x_value | ) |
Constructor specifying an allowed integer value.
Definition at line 4673 of file ncbiargs.cpp.
References CArgAllow_Int8s::Allow().
|
inlineprotected |
Definition at line 1728 of file ncbiargs.hpp.
Referenced by CArgAllow_Int8s::Clone().
Constructor specifying range of allowed integer values.
Definition at line 4773 of file ncbiargs.cpp.
CArgAllow_Integers::CArgAllow_Integers | ( | int | x_value | ) |
Constructor specifying an allowed integer value.
Definition at line 4768 of file ncbiargs.cpp.
|
inlineprotected |
Definition at line 1762 of file ncbiargs.hpp.
Referenced by CArgAllow_Integers::Clone().
pattern | Perl regexp pattern that the argument value must match |
Definition at line 45 of file arg_regexp.cpp.
Referenced by CArgAllow_Regexp::Clone().
Constructor for user defined eUser class.
Definition at line 4521 of file ncbiargs.cpp.
CArgAllow_String::CArgAllow_String | ( | ESymbolClass | symbol_class | ) |
Constructor.
Definition at line 4514 of file ncbiargs.cpp.
|
inlineprotected |
Definition at line 1618 of file ncbiargs.hpp.
Referenced by CArgAllow_String::Clone().
CArgAllow_Strings::CArgAllow_Strings | ( | initializer_list< string > | values, |
NStr::ECase | use_case = NStr::eCase |
||
) |
Constructor.
values | Strings to add to the set of allowed string values |
use_case | If to ignore the case of the characters |
Definition at line 4592 of file ncbiargs.cpp.
CArgAllow_Strings::CArgAllow_Strings | ( | NStr::ECase | use_case = NStr::eCase | ) |
Constructor.
use_case | If to ignore the case of the characters |
Definition at line 4584 of file ncbiargs.cpp.
Referenced by CArgAllow_Strings::Clone().
Constructor for user defined eUser class.
Definition at line 4437 of file ncbiargs.cpp.
References CArgAllow_Symbols::Allow().
CArgAllow_Symbols::CArgAllow_Symbols | ( | ESymbolClass | symbol_class | ) |
|
inlineprotected |
Definition at line 1576 of file ncbiargs.hpp.
Referenced by CArgAllow_Symbols::Clone().
|
private |
|
private |
Definition at line 4905 of file ncbiargs.cpp.
Referenced by CArgDependencyGroup::Create().
CArgDesc::CArgDesc | ( | const string & | name, |
const string & | comment, | ||
CArgDescriptions::TFlags | flags = 0 |
||
) |
Constructor.
name | Argument name |
comment | Argument description |
Definition at line 923 of file ncbiargs.cpp.
References CArgDesc::m_Name, NCBI_THROW, and CArgDescriptions::VerifyName().
CArgDescriptions::CArgDescriptions | ( | bool | auto_help = true , |
CArgErrorHandler * | err_handler = 0 |
||
) |
Constructor.
If "auto_help" is passed TRUE, then a special flag "-h" will be added to the list of accepted arguments. Passing "-h" in the command line will printout USAGE and ignore all other passed arguments. Error handler is used to process errors when parsing arguments. If not set the default handler is used.
Definition at line 2189 of file ncbiargs.cpp.
References CArgDescriptions::AddFlag(), kEmptyStr, CArgDescriptions::m_ArgGroups, CArgDescriptions::m_AutoHelp, CArgDescriptions::m_ErrorHandler, CRef< C, Locker >::Reset(), s_AutoHelp, s_AutoHelpFull, s_AutoHelpShowAll, s_AutoHelpXml, and CArgDescriptions::SetUsageContext().
Creating copy of this object usually makes no sense if it is really required, please use Assign method.
Definition at line 1760 of file ncbiargs.cpp.
References CArgs::Assign().
CArgs::CArgs | ( | void | ) |
Protected constructor and destructor.
Prohibit explicit instantiation of CArgValue with name.
Definition at line 151 of file ncbiargs.cpp.
References CArgValue::m_Name, NCBI_THROW, and CArgDescriptions::VerifyName().
CCommandArgDescriptions::CCommandArgDescriptions | ( | bool | auto_help = true , |
CArgErrorHandler * | err_handler = 0 , |
||
TCommandArgFlags | cmd_flags = eCommandMandatory |
||
) |
Constructor.
If "auto_help" is passed TRUE, then a special flag "-h" will be added to the list of accepted arguments. Passing "-h" in the command line will printout USAGE and ignore all other passed arguments. Error handler is used to process errors when parsing arguments. If not set the default handler is used.
Definition at line 3979 of file ncbiargs.cpp.
|
virtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented in CArgAllow_Regexp, CArgAllow_Doubles, CArgAllow_Integers, CArgAllow_Int8s, CArgAllow_Strings, CArgAllow_String, and CArgAllow_Symbols.
Definition at line 4350 of file ncbiargs.cpp.
References NULL.
Referenced by CArgDescriptions::SetConstraint().
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow.
Reimplemented in CArgAllow_String.
Definition at line 4501 of file ncbiargs.cpp.
References CArgAllow_Symbols::CArgAllow_Symbols(), and CArgAllow_Symbols::m_SymClass.
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow_Symbols.
Definition at line 4571 of file ncbiargs.cpp.
References CArgAllow_String::CArgAllow_String(), and CArgAllow_Symbols::m_SymClass.
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow.
Definition at line 4661 of file ncbiargs.cpp.
References CArgAllow_Strings::CArgAllow_Strings(), and CArgAllow_Strings::m_Strings.
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow.
Reimplemented in CArgAllow_Integers.
Definition at line 4755 of file ncbiargs.cpp.
References CArgAllow_Int8s::CArgAllow_Int8s(), and CArgAllow_Int8s::m_MinMax.
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow_Int8s.
Definition at line 4796 of file ncbiargs.cpp.
References CArgAllow_Integers::CArgAllow_Integers(), and CArgAllow_Int8s::m_MinMax.
|
protectedvirtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow.
Definition at line 4886 of file ncbiargs.cpp.
References CArgAllow_Doubles::CArgAllow_Doubles(), and CArgAllow_Doubles::m_MinMax.
|
virtual |
Create object's clone, moving it from stack memory into heap.
The method is required only when using objects created on stack.
NOTE: Default implementation returns NULL. Inherited classes must override this method.
Reimplemented from CArgAllow.
Definition at line 80 of file arg_regexp.cpp.
References CArgAllow_Regexp::CArgAllow_Regexp(), and CArgAllow_Regexp::m_Pattern.
|
pure virtual |
Close the file.
Implemented in CArg_Ios, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
|
inline |
Convert argument map (key-value pairs) into arguments in accordance with the argument descriptions.
Definition at line 1320 of file ncbiargs.hpp.
References CArgDescriptions::eConvertKeys, ITERATE, CArgDescriptions::m_KeyFlagArgs, CArgValue::SetStringList(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_IsMultiArg(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PreCheck().
Referenced by CCgiApplication::InitArgs().
CArgDescriptions::CPrintUsage::CPrintUsage | ( | const CArgDescriptions & | desc | ) |
Definition at line 3555 of file ncbiargs.cpp.
References _ASSERT, set< Key, Compare >::begin(), set< Key, Compare >::end(), CArgDescriptions::fHidden, CArgDescriptions::fUsageSortArgs, CArgDesc::GetName(), CArgDescriptions::IsSetMiscFlag(), kEmptyStr, CArgDescriptions::m_Args, CArgDescriptions::CPrintUsage::m_args, CArgDescriptions::m_AutoHelp, CArgDescriptions::m_HasHidden, CArgDescriptions::m_KeyFlagArgs, CArgDescriptions::m_OpeningArgs, CArgDescriptions::m_PosArgs, s_AutoHelp, s_AutoHelpFull, s_AutoHelpShowAll, util::strcmp(), and CArgDescriptions::x_Find().
CArgDescriptions::CPrintUsageXml::CPrintUsageXml | ( | const CArgDescriptions & | desc, |
CNcbiOstream & | out | ||
) |
Definition at line 3841 of file ncbiargs.cpp.
References CArgDescriptions::eCgiArgs, CArgDescriptions::eRegularArgs, CArgDescriptions::GetArgsType(), CNcbiApplication::Instance(), CArgDescriptions::m_DetailedDescription, CArgDescriptions::CPrintUsageXml::m_out, CArgDescriptions::m_UsageDescription, CArgDescriptions::m_UsageName, Print(), and s_WriteXmlLine().
|
static |
Create new dependency group.
name | Name of the group |
description | User-provided description of the dependency group (for Usage). A generated description will be added to it. |
Definition at line 4896 of file ncbiargs.cpp.
References CArgDependencyGroup::CArgDependencyGroup().
|
virtual |
Parse command-line arguments 'argv' out of CNcbiArguments.
Reimplemented in CCommandArgDescriptions.
Definition at line 2833 of file ncbiargs.cpp.
References CArgDescriptions::CreateArgs(), kEmptyStr, CArgDescriptions::SetCurrentGroup(), and CNcbiArguments::Size().
|
virtual |
Parse command-line arguments 'argv'.
Reimplemented from CArgDescriptions.
Definition at line 4092 of file ncbiargs.cpp.
References command, CArgDescriptions::CreateArgs(), map_checker< Container >::empty(), ctll::empty(), map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, CCommandArgDescriptions::m_Command, CCommandArgDescriptions::m_Description, NCBI_THROW, CArgs::SetCommand(), CNcbiArguments::Shift(), CNcbiArguments::Size(), CArgDescriptions::x_CheckAutoHelp(), CCommandArgDescriptions::x_IdentifyCommand(), and CCommandArgDescriptions::x_IsCommandMandatory().
|
inline |
Create parsed arguments in CArgs object.
Parse command-line arguments, and create "CArgs" args object from the passed command-line arguments "argc" and "argv".
Throw
Definition at line 1279 of file ncbiargs.hpp.
References CArgDescriptions::eCgiArgs, CArgDescriptions::eCreateArgs, CArgDescriptions::GetArgsType(), i, kEmptyStr, kMax_UInt, CArgDescriptions::x_CheckAutoHelp(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PreCheck().
Referenced by CArgDescriptions::CreateArgs(), CCommandArgDescriptions::CreateArgs(), CBlastArgs::s_CreateBlastOptions(), and CNcbiApplicationAPI::SetupArgDescriptions().
CArgValue::DECLARE_OPERATOR_BOOL | ( | HasValue() | ) |
Synonym for HasValue().
Delete description of argument with name "name".
Extra arguments get deleted by the name passed as "".
Throw the CArgException (eSynopsis error code) exception if the specified name cannot be found.
Definition at line 2660 of file ncbiargs.cpp.
References _ASSERT, set< Key, Compare >::end(), set< Key, Compare >::erase(), CArgDescriptions::m_Args, CArgDescriptions::m_AutoHelp, CArgDescriptions::m_KeyFlagArgs, CArgDescriptions::m_nExtra, CArgDescriptions::m_nExtraOpt, CArgDescriptions::m_PosArgs, NCBI_THROW, s_AutoHelp, and CArgDescriptions::x_Find().
Referenced by CCommandArgDescriptions::AddCommand(), and CArgDescriptions::AddStdArguments().
Definition at line 4939 of file ncbiargs.cpp.
References CArgDependencyGroup::x_Evaluate().
Check existence of argument description.
Return TRUE if arg "name" was described in the parent CArgDescriptions.
NOTE: Do not confuse this method with CArgValue::HasValue() which checks if the argument not just exists, but was assigned a value (possibly the default one).
Definition at line 1813 of file ncbiargs.cpp.
References set< Key, Compare >::end(), CArgs::m_Args, and CArgs::x_Find().
Referenced by BuildAlgorithmParametersString(), CGenomicCollectionsService::CGenomicCollectionsService(), CBlastDBAliasApp::ConvertGiFile(), CBlastDBAliasApp::CreateAliasFile(), CWinMaskConfig::CWinMaskConfig(), CMapperMTArgs::ExtractAlgorithmOptions(), CMapperQueryOptionsArgs::ExtractAlgorithmOptions(), CMapperFormattingArgs::ExtractAlgorithmOptions(), CBlastDatabaseArgs::ExtractAlgorithmOptions(), CFormattingArgs::ExtractAlgorithmOptions(), CMbIndexArgs::ExtractAlgorithmOptions(), CStdCmdLineArgs::ExtractAlgorithmOptions(), CGenericSearchArgs::ExtractAlgorithmOptions(), CFilteringArgs::ExtractAlgorithmOptions(), CNuclArgs::ExtractAlgorithmOptions(), CCompositionBasedStatsArgs::ExtractAlgorithmOptions(), CPssmEngineArgs::ExtractAlgorithmOptions(), CPsiBlastArgs::ExtractAlgorithmOptions(), CPhiBlastArgs::ExtractAlgorithmOptions(), CKBlastpArgs::ExtractAlgorithmOptions(), CDeltaBlastArgs::ExtractAlgorithmOptions(), CMappingArgs::ExtractAlgorithmOptions(), CQueryOptionsArgs::ExtractAlgorithmOptions(), CIgBlastArgs::ExtractAlgorithmOptions(), CRemoteArgs::ExtractAlgorithmOptions(), NParamsBuilder::SOneRequest::GetDataOnlyEnabled(), NParamsBuilder::SOneRequest::GetDataOnlyOutputFormat(), CSearchStrategyArgs::GetExportStream(), CSearchStrategyArgs::GetImportStream(), GetSubjectFile(), CBlastDatabaseArgs::HasBeenSet(), CMbIndexArgs::HasBeenSet(), RecoverSearchStrategy(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CSeedTopApp::Run(), CTblastnApp::Run(), CIgBlastnApp::Run(), CNcbiApplogApp::Run(), CTbl2AsnApp::Run(), BlastdbCopyApplication::Run(), CVDBBlastnApp::Run(), CVDBTblastnApp::Run(), CClientGenomicCollectionsSvcApplication::Run(), CSampleBasicApplication::Run(), CBlastAppArgs::SetOptions(), CBlastnAppArgs::x_CreateOptionsHandle(), CBlastpAppArgs::x_CreateOptionsHandle(), CBlastxAppArgs::x_CreateOptionsHandle(), CPsiBlastAppArgs::x_CreateOptionsHandle(), CTblastnAppArgs::x_CreateOptionsHandle(), CTblastnVdbAppArgs::x_CreateOptionsHandle(), CArgDependencyGroup::x_Evaluate(), CMTArgs::x_ExtractAlgorithmOptions(), CArgDescriptions::x_PostCheck(), CDataLoadersUtil::x_SetupASNCacheDataLoader(), CDataLoadersUtil::x_SetupBlastDataLoader(), CDataLoadersUtil::x_SetupGenbankDataLoader(), CDataLoadersUtil::x_SetupLDS2DataLoader(), CDataLoadersUtil::x_SetupSRADataLoader(), and CDataLoadersUtil::x_SetupVDBDataLoader().
Check if there is already an argument description with specified name.
Definition at line 2654 of file ncbiargs.cpp.
References set< Key, Compare >::end(), CArgDescriptions::m_Args, and CArgDescriptions::x_Find().
Referenced by CCommandArgDescriptions::AddCommand(), CArgDescriptions::AddDefaultFileArguments(), CArgDescriptions::AddStdArguments(), CProSplignOptions_Base::SetupArgDescriptions(), and CArgDescriptions::x_AddDesc().
Get all available arguments.
Definition at line 1864 of file ncbiargs.cpp.
References a, ITERATE, and CArgs::m_Args.
Referenced by CJniUtil::GetArgsFromNcbiApp(), CArgDescriptions::x_CreateArg(), and CBlastAppArgs::x_IssueWarningsForIgnoredOptions().
|
inlinevirtual |
Reimplemented in CCommandArgDescriptions.
Definition at line 1361 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::GetAllDescriptions(), and CArgDescriptions::ShowAllArguments().
|
virtual |
Reimplemented from CArgDescriptions.
Definition at line 4318 of file ncbiargs.cpp.
References all, map_checker< Container >::begin(), map_checker< Container >::end(), CArgDescriptions::GetAllDescriptions(), and CCommandArgDescriptions::m_Description.
|
inline |
Definition at line 569 of file ncbiargs.hpp.
References CArgDescriptions::m_ArgsType.
Referenced by CArgDescriptions::CPrintUsageXml::CPrintUsageXml(), CArgDescriptions::CreateArgs(), and CArgDescriptions::x_PostCheck().
|
inline |
Get current command.
Definition at line 465 of file ncbiargs.hpp.
References CArgs::m_Command.
Referenced by CNcbiApplogApp::Redirect(), CNcbiApplogApp::Run(), and CClientGenomicCollectionsSvcApplication::RunWithService().
Get argument description.
Definition at line 1840 of file ncbiargs.hpp.
References CArgDesc::m_Comment.
Referenced by CArgDesc::PrintXml(), and CArgDescriptions::x_PrintComment().
Get argument constraint.
Reimplemented in CArgDescMandatory.
Definition at line 957 of file ncbiargs.cpp.
Referenced by CArgDesc::GetUsageConstraint(), and CArgDesc::PrintXml().
const string & CArgValue::GetDefault | ( | TArgValueFlags * | flags = NULL | ) | const |
Get default value of the argument.
flags | Indicate whether the argument has default value, and if the arg's value was set from the command line or from the default value. |
Definition at line 173 of file ncbiargs.cpp.
References CArgValue::m_Default, and CArgValue::m_Flags.
|
overridevirtual |
Translate from the error code value to its string representation.
Reimplemented from CCoreException.
Reimplemented in CArgHelpException.
Definition at line 5126 of file ncbiargs.cpp.
References CArgException::eArgType, CArgException::eConstraint, CArgException::eConvert, CArgException::eExcludedValue, CArgException::eInvalidArg, CArgException::eNoArg, CArgException::eNoFile, CArgException::eNoValue, CArgException::eSynopsis, CArgException::eWrongCast, CCoreException::GetErrCode(), and CException::GetErrCodeString().
|
overridevirtual |
Translate from the error code value to its string representation.
Reimplemented from CArgException.
Definition at line 5143 of file ncbiargs.cpp.
References CArgHelpException::eHelp, CArgHelpException::eHelpErr, CArgHelpException::eHelpFull, CArgHelpException::eHelpShowAll, CArgHelpException::eHelpXml, CCoreException::GetErrCode(), and CException::GetErrCodeString().
|
inlinevirtual |
Get error handler for the argument.
Reimplemented in CArgDescMandatory.
Definition at line 1883 of file ncbiargs.hpp.
|
inline |
Get argument flags.
Definition at line 1888 of file ncbiargs.hpp.
References CArgDesc::m_Flags.
Referenced by CArgDesc::GetUsageConstraint(), CArgDesc_Key::GetUsageSynopsis(), CArgDesc_KeyOpt::GetUsageSynopsis(), CArgDesc_KeyDef::GetUsageSynopsis(), CArgErrorHandler::HandleError(), CArgDesc::PrintXml(), CArgDescMandatory::ProcessArgument(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_IsMultiArg(), and CArgDescriptions::x_PrintComment().
|
inlinevirtual |
Get argument group.
Reimplemented in CArgDesc_Flag, and CArgDescOptional.
Definition at line 1843 of file ncbiargs.hpp.
Referenced by CArgDesc::PrintXml().
Get argument name.
Definition at line 187 of file ncbiargs.hpp.
References CArgValue::m_Name.
Referenced by CArgs::Add(), CArg_String::AsBoolean(), CArg_String::AsDateTime(), CArg_String::AsDirectory(), CArg_String::AsDouble(), CArg_String::AsInputFile(), CArg_String::AsInt8(), CArg_String::AsInteger(), CArg_IntId::AsInteger(), CArg_String::AsIntId(), CArg_Int8::AsIntId(), CArg_String::AsIOFile(), CArg_String::AsOutputFile(), CArg_Boolean::CArg_Boolean(), CArg_DataSize::CArg_DataSize(), CArg_DateTime::CArg_DateTime(), CArg_Double::CArg_Double(), CArg_Int8::CArg_Int8(), CArg_Integer::CArg_Integer(), CArg_IntId::CArg_IntId(), CArg_String::CloseFile(), CArg_Ios::CloseFile(), operator<(), and CArg_Ios::x_Open().
Get argument name.
Definition at line 1837 of file ncbiargs.hpp.
References CArgDesc::m_Name.
Referenced by CArgDescMandatory::CArgDescMandatory(), CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDesc_Flag::GetUsageSynopsis(), CArgDesc_Pos::GetUsageSynopsis(), CArgDesc_Opening::GetUsageSynopsis(), CArgDesc_Key::GetUsageSynopsis(), CArgDesc_KeyOpt::GetUsageSynopsis(), CArgDesc_KeyDef::GetUsageSynopsis(), CArgErrorHandler::HandleError(), operator<(), CArgDesc::PrintXml(), CArgDescMandatory::ProcessArgument(), CArgDesc_Flag::ProcessArgument(), CArgDesc_Alias::ProcessArgument(), CArgDescMandatory::ProcessDefault(), CArgDescOptional::ProcessDefault(), CArgDesc_Flag::ProcessDefault(), CArgDesc_Alias::ProcessDefault(), CArgDesc::SetConstraint(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_PostCheck(), CArgDescriptions::x_PreCheck(), CArgDescriptions::x_PrintAliasesAsXml(), and CArgDescriptions::x_PrintComment().
|
inline |
Get the number of unnamed positional (a.k.a. extra) args.
Definition at line 422 of file ncbiargs.hpp.
References CArgs::m_nExtra.
Referenced by CIdMapperApp::GetSourceIds(), COMSSAMerge::Run(), CDemoSeqQaApp::Run(), CCpGDemoApp::Run(), CAgpValidateApplication::Run(), CAgpconvertApplication::Run(), CMultipatternApp::Run(), CPsgPerfApplication::Run(), CRunTestApplication::Run(), CTestApplication::Run(), CSampleBasicApplication::Run(), CGapStatsApplication::RunNoCatch(), and CAgpValidateApplication::x_ValidateUsingFiles().
|
inline |
Get ordinal position of the value.
NOTE: this is not the position in command line, rather this reflects the order in which values were added to the list.
Definition at line 304 of file ncbiargs.hpp.
References CArgValue::m_Ordinal.
|
inline |
Definition at line 585 of file ncbiargs.hpp.
References CArgDescriptions::m_PositionalMode.
Referenced by CArgDescriptions::CPrintUsageXml::PrintArguments().
|
virtual |
Get the value list.
Reimplemented in CArg_String.
Definition at line 211 of file ncbiargs.cpp.
References THROW_CArg_NoValue.
Referenced by CArgs::Print().
Get argument type's name.
Definition at line 2385 of file ncbiargs.cpp.
References _TROUBLE, int, CArgDescriptions::k_EType_Size, and NCBI_THROW.
Referenced by CArgDescMandatory::CArgDescMandatory(), CArgDescMandatory::GetUsageCommentAttr(), CArgDesc::PrintXml(), and CArgDescriptions::x_PrintComment().
|
protectedvirtual |
Get usage information.
Implements CArgAllow.
Reimplemented in CArgAllow_String.
Definition at line 4459 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Symbols::m_SymClass, pi, s_GetUsageSymbol(), and usage.
|
protectedvirtual |
Get usage information.
Reimplemented from CArgAllow_Symbols.
Definition at line 4544 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Symbols::m_SymClass, pi, s_GetUsageSymbol(), and usage.
|
protectedvirtual |
Get usage information.
Implements CArgAllow.
Definition at line 4613 of file ncbiargs.cpp.
References set< Key, Compare >::begin(), set< Key, Compare >::empty(), set< Key, Compare >::end(), CArgAllow_Strings::m_Strings, and str().
|
protectedvirtual |
Get usage information.
Implements CArgAllow.
Reimplemented in CArgAllow_Integers.
Definition at line 4698 of file ncbiargs.cpp.
References set< Key, Compare >::begin(), NStr::Int8ToString(), ITERATE, kEmptyStr, kMax_I8, kMin_I8, CArgAllow_Int8s::m_MinMax, pi, set< Key, Compare >::size(), string, and usage.
Referenced by CArgAllow_Integers::GetUsage().
|
protectedvirtual |
Get usage information.
Reimplemented from CArgAllow_Int8s.
Definition at line 4778 of file ncbiargs.cpp.
References set< Key, Compare >::begin(), CArgAllow_Int8s::GetUsage(), NStr::Int8ToString(), kEmptyStr, kMax_Int, kMin_Int, CArgAllow_Int8s::m_MinMax, set< Key, Compare >::size(), and string.
|
protectedvirtual |
Get usage information.
Implements CArgAllow.
Definition at line 4833 of file ncbiargs.cpp.
References set< Key, Compare >::begin(), NStr::DoubleToString(), ITERATE, kEmptyStr, kMax_Double, kMin_Double, CArgAllow_Doubles::m_MinMax, pi, set< Key, Compare >::size(), string, and usage.
|
virtual |
Get usage information.
Implements CArgAllow.
Definition at line 66 of file arg_regexp.cpp.
References CArgAllow_Regexp::m_Pattern.
|
pure virtual |
Get usage information.
Implemented in CArgAllowGeneticCodeInteger, CArgAllow_Regexp, CArgAllow_Doubles, CArgAllow_Integers, CArgAllow_Int8s, CArgAllow_Strings, CArgAllow_String, CArgAllow_Symbols, CArgAllowStringSet, CArgAllowIntegerSet, CArgAllowValuesBetween, CArgAllowValuesLessThanOrEqual, CArgAllowValuesGreaterThanOrEqual, and CArgAllowMaximumFileNameLength.
Referenced by CArgDesc::GetUsageConstraint(), CArgDescMandatory::ProcessArgument(), and CArgDesc::SetConstraint().
|
pure virtual |
Get usage comment attribute.
Implemented in CArgDesc_Alias, CArgDesc_Flag, CArgDescMandatory, and CArgDesc_NameOnly.
Referenced by CArgDescriptions::x_PrintComment().
string CArgDesc::GetUsageConstraint | ( | void | ) | const |
Get usage constraint.
Definition at line 963 of file ncbiargs.cpp.
References CArgDescriptions::fConfidential, CArgDesc::GetConstraint(), CArgDesc::GetFlags(), CArgAllow::GetUsage(), CArgDesc::IsConstraintInverted(), kEmptyStr, and usage.
Referenced by CArgDescMandatory::GetUsageCommentAttr(), and CArgDesc::PrintXml().
Get usage synopsis.
Implemented in CArgDesc_NameOnly, CArgDescMandatory, CArgDesc_KeyDef, CArgDesc_KeyOpt, CArgDesc_Key, CArgDesc_Opening, CArgDesc_Pos, CArgDesc_Flag, and CArgDesc_Alias.
Referenced by CArgDescriptions::x_PrintComment().
|
virtual |
Process invalid argument value.
The base implementation returns NULL or throws exception depending on the CArgDesc flags.
arg_desc | CArgDesc object which failed to initialize. |
value | String value which caused the error. |
Definition at line 2166 of file ncbiargs.cpp.
References ERR_POST_X, CArgDescriptions::fIgnoreInvalidValue, CArgDescriptions::fWarnOnInvalidValue, CArgDesc::GetFlags(), CArgDesc::GetName(), CArgDesc::ProcessArgument(), rapidjson::value, and Warning().
|
pure virtual |
Check if argument holds a value.
Argument does not hold value if it was described as optional argument without default value, and if it was not passed a value in the command line. On attempt to retrieve the value from such "no-value" argument, exception will be thrown.
NOTE: HasValue() and operator bool() check if the argument has any value, they do not return the actual value of boolean arguments. if (args["bv"]) ... - check if "bv" has any value if (args["bv"].AsBoolean()) ... - check the actual value of "bv" argument
Implemented in CArg_Flag, CArg_String, CArg_ExcludedValue, and CArg_NoValue.
Referenced by CCodeGenerator::GetOpt(), and CMakeBlastDBApp::x_ProcessMaskData().
|
inline |
See if special flag "-h" is activated.
Definition at line 1099 of file ncbiargs.hpp.
References CArgDescriptions::m_AutoHelp.
|
inlinevirtual |
Returns TRUE if associated constraint is inverted (NOT)
Reimplemented in CArgDescMandatory.
Definition at line 1874 of file ncbiargs.hpp.
Referenced by CArgDesc::GetUsageConstraint(), and CArgDesc::PrintXml().
bool CArgs::IsEmpty | ( | void | ) | const |
Check if there are no arguments in this container.
Definition at line 1955 of file ncbiargs.cpp.
References set< Key, Compare >::empty(), and CArgs::m_Args.
Referenced by CArgDescriptions::x_PostCheck().
|
inline |
Check if the flag is set.
Definition at line 1051 of file ncbiargs.hpp.
References CArgDescriptions::m_MiscFlags.
Referenced by CArgDescriptions::CPrintUsage::CPrintUsage(), and CArgDescriptions::x_PostCheck().
CArgException::NCBI_EXCEPTION_DEFAULT | ( | CArgException | , |
CCoreException | |||
) |
CArgHelpException::NCBI_EXCEPTION_DEFAULT | ( | CArgHelpException | , |
CArgException | |||
) |
|
inline |
Short notation operator for adding allowed string values.
value | String to add to the set of allowed string values |
Definition at line 1670 of file ncbiargs.hpp.
References CArgAllow_Strings::AllowValue(), and rapidjson::value.
Definition at line 356 of file ncbiargs.hpp.
References CArgValue::GetName().
|
private |
Creating copy of this object usually makes no sense if it is really required, please use Assign method.
Definition at line 1765 of file ncbiargs.cpp.
References CArgs::Assign().
Get value of argument by name.
If the name starts with '-' (e.g. '-arg') the argument can also be found by 'arg' name if there is no another argument named 'arg'.
Throw an exception if such argument does not exist (not described in the CArgDescriptions).
Definition at line 1819 of file ncbiargs.cpp.
References set< Key, Compare >::end(), kMax_UInt, CArgs::m_Args, CArgs::m_nExtra, NCBI_THROW, s_ComposeNameExtra(), NStr::StringToUInt(), and CArgs::x_Find().
Return N-th extra arg value, N = 1 to GetNExtra().
Definition at line 1859 of file ncbiargs.cpp.
References s_ComposeNameExtra().
Print (append) all arguments to the string "str" and return "str".
Definition at line 1876 of file ncbiargs.cpp.
References CArgValue::AsString(), set< Key, Compare >::begin(), set< Key, Compare >::end(), CArgValue::GetStringList(), NStr::Join(), CArgs::m_Args, str(), and tmp.
Referenced by CXcompareAnnotsApplication::Run(), CReadBlastApp::Run(), and CSampleBasicApplication::Run().
void CArgDescriptions::CPrintUsageXml::PrintArguments | ( | const CArgDescriptions & | desc | ) | const |
Definition at line 3870 of file ncbiargs.cpp.
References a, CArgDescriptions::eExcludes, multimap_checker< Container >::empty(), CArgDescriptions::ePositionalMode_Loose, CArgDescriptions::eRequires, CArgDescriptions::GetPositionalMode(), i, ITERATE, CArgDescriptions::m_Args, CArgDescriptions::m_Dependencies, CArgDescriptions::m_nExtra, CArgDescriptions::m_nExtraOpt, CArgDescriptions::m_OpeningArgs, CArgDescriptions::m_PosArgs, s_IsFlag(), s_IsKey(), s_IsPositional(), s_WriteXmlLine(), tag, NStr::UIntToString(), and CArgDescriptions::x_PrintAliasesAsXml().
Referenced by CArgDescriptions::PrintUsageXml(), and CCommandArgDescriptions::PrintUsageXml().
void CArgDependencyGroup::PrintUsage | ( | list< string > & | arr, |
size_t | offset | ||
) | const |
Definition at line 5014 of file ncbiargs.cpp.
References arr, map_checker< Container >::begin(), count, CArgDependencyGroup::eInstantSet, map_checker< Container >::end(), first(), i, NStr::Join(), kEmptyStr, CArgDependencyGroup::m_Arguments, CArgDependencyGroup::m_Description, CArgDependencyGroup::m_Groups, CArgDependencyGroup::m_MaxMembers, CArgDependencyGroup::m_MinMembers, CArgDependencyGroup::m_Name, msg(), NStr::NumericToString(), offset, and map_checker< Container >::size().
Print usage message to end of specified string.
Printout USAGE and append to the string "str" using provided argument descriptions and usage context.
Reimplemented in CArgDesc_agp_validate, CDiscRepArgDescriptions, and CCommandArgDescriptions.
Definition at line 3815 of file ncbiargs.cpp.
References CArgDescriptions::CPrintUsage::AddDescription(), CArgDescriptions::CPrintUsage::AddDetails(), CArgDescriptions::CPrintUsage::AddSynopsis(), arr, NStr::Join(), kEmptyStr, CArgDescriptions::m_UsageName, and str().
Referenced by CCgiRequestProcessor::OnException(), CDiscRepArgDescriptions::PrintUsage(), CMakeScoreMethodApp::Run(), and CBlastArgs::s_CreateBlastOptions().
Print usage message to end of specified string.
Printout USAGE and append to the string "str" using provided argument descriptions and usage context.
Reimplemented from CArgDescriptions.
Definition at line 4134 of file ncbiargs.cpp.
References a, CArgDescriptions::CPrintUsage::AddCommandDescription(), CArgDescriptions::CPrintUsage::AddDescription(), CArgDescriptions::CPrintUsage::AddDetails(), CArgDescriptions::CPrintUsage::AddSynopsis(), arr, map_checker< Container >::begin(), cmd, map_checker< Container >::empty(), map_checker< Container >::end(), CCommandArgDescriptions::eNoSortCommands, CCommandArgDescriptions::eNoSortGroups, map_checker< Container >::find(), CNcbiApplicationAPI::GetArguments(), CNcbiApplication::Instance(), ITERATE, NStr::Join(), kEmptyStr, map_checker< Container >::lower_bound(), CCommandArgDescriptions::m_Aliases, CArgDescriptions::m_AutoHelp, CCommandArgDescriptions::m_Cmd_req, CCommandArgDescriptions::m_CmdGroups, CCommandArgDescriptions::m_Command, CCommandArgDescriptions::m_Commands, CCommandArgDescriptions::m_Description, CCommandArgDescriptions::m_Groups, CArgDescriptions::m_HasHidden, CArgDescriptions::m_UsageName, max(), NULL, map_checker< Container >::size(), CNcbiArguments::Size(), str(), t, CCommandArgDescriptions::x_GetCommandGroupIndex(), CCommandArgDescriptions::x_IdentifyCommand(), and CCommandArgDescriptions::x_IsCommandMandatory().
Print usage and exit.
Force to print USAGE unconditionally (and then exit) if no command-line args are present.
Definition at line 3410 of file ncbiargs.cpp.
References CArgDescriptions::fUsageIfNoArgs, CArgDescriptions::ResetMiscFlags(), and CArgDescriptions::SetMiscFlags().
|
virtual |
Print argument description in XML format.
out | Print into this output stream |
Reimplemented in CCommandArgDescriptions.
Definition at line 3953 of file ncbiargs.cpp.
References out(), and CArgDescriptions::CPrintUsageXml::PrintArguments().
Referenced by CCgiRequestProcessor::ProcessHelpRequest().
|
virtual |
Print argument description in XML format.
out | Print into this output stream |
Reimplemented from CArgDescriptions.
Definition at line 4285 of file ncbiargs.cpp.
References map_checker< Container >::begin(), map_checker< Container >::end(), map_checker< Container >::find(), g(), CCommandArgDescriptions::m_Aliases, CCommandArgDescriptions::m_CmdGroups, CCommandArgDescriptions::m_Commands, CCommandArgDescriptions::m_Description, CCommandArgDescriptions::m_Groups, out(), CArgDescriptions::CPrintUsageXml::PrintArguments(), s_WriteXmlLine(), CCommandArgDescriptions::x_GetCommandGroupIndex(), and CCommandArgDescriptions::x_IsCommandMandatory().
|
virtual |
Print constraints in XML format.
Reimplemented in CArgAllow_Regexp, CArgAllow_Doubles, CArgAllow_Int8s, CArgAllow_Strings, CArgAllow_String, and CArgAllow_Symbols.
Definition at line 4346 of file ncbiargs.cpp.
Referenced by CArgDesc::PrintXml().
|
protectedvirtual |
Print constraints in XML format.
Reimplemented from CArgAllow.
Reimplemented in CArgAllow_String.
Definition at line 4472 of file ncbiargs.cpp.
References CArgAllow_Symbols::eUser, ITERATE, CArgAllow_Symbols::m_SymClass, out(), pi, s_GetSymbolClass(), and s_WriteXmlLine().
|
protectedvirtual |
Print constraints in XML format.
Reimplemented from CArgAllow_Symbols.
Definition at line 4558 of file ncbiargs.cpp.
References CArgAllow_Symbols::eUser, ITERATE, CArgAllow_Symbols::m_SymClass, out(), pi, s_GetSymbolClass(), and s_WriteXmlLine().
|
protectedvirtual |
Print constraints in XML format.
Reimplemented from CArgAllow.
Definition at line 4639 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Strings::m_Strings, out(), and s_WriteXmlLine().
|
protectedvirtual |
Print constraints in XML format.
Reimplemented from CArgAllow.
Definition at line 4729 of file ncbiargs.cpp.
References NStr::Int8ToString(), ITERATE, CArgAllow_Int8s::m_MinMax, out(), pi, s_WriteXmlLine(), and tag.
|
protectedvirtual |
Print constraints in XML format.
Reimplemented from CArgAllow.
Definition at line 4864 of file ncbiargs.cpp.
References NStr::DoubleToString(), ITERATE, CArgAllow_Doubles::m_MinMax, out(), pi, and s_WriteXmlLine().
void CArgDependencyGroup::PrintUsageXml | ( | CNcbiOstream & | out | ) | const |
Definition at line 5092 of file ncbiargs.cpp.
References map_checker< Container >::begin(), CArgDependencyGroup::eInstantSet, map_checker< Container >::end(), i, CArgDependencyGroup::m_Arguments, CArgDependencyGroup::m_Description, CArgDependencyGroup::m_Groups, CArgDependencyGroup::m_MaxMembers, CArgDependencyGroup::m_MinMembers, CArgDependencyGroup::m_Name, and out().
|
virtual |
Print constraints in XML format.
Reimplemented from CArgAllow.
Definition at line 72 of file arg_regexp.cpp.
References CArgAllow_Regexp::m_Pattern, and out().
string CArgDesc::PrintXml | ( | CNcbiOstream & | out | ) | const |
Print description in XML format.
Definition at line 988 of file ncbiargs.cpp.
References CUtf8::AsUTF8(), eEncoding_Unknown, CArgDescriptions::fAllowMultiple, CArgDescriptions::fAppend, CArgDescriptions::fBinary, CArgDescriptions::fConfidential, CArgDescriptions::fCreatePath, CArgDescriptions::fHidden, CArgDescriptions::fIgnoreInvalidValue, flags, CArgDescriptions::fMandatorySeparator, CArgDescriptions::fNoCreate, CArgDescriptions::fOptionalSeparator, CArgDescriptions::fOptionalSeparatorAllowConflict, CArgDescriptions::fPreOpen, CArgDescriptions::fTruncate, CArgDescriptions::fWarnOnInvalidValue, CArgDesc::GetComment(), CArgDesc::GetConstraint(), CArgDescDefault::GetDisplayValue(), CArgDesc::GetFlags(), CArgDesc::GetGroup(), CArgDesc::GetName(), CArgDesc_Flag::GetSetValue(), CArgDescSynopsis::GetSynopsis(), CArgDescMandatory::GetType(), CArgDescriptions::GetTypeName(), CArgDesc::GetUsageConstraint(), CArgDesc::IsConstraintInverted(), out(), CArgAllow::PrintUsageXml(), s_IsFlag(), s_IsKey(), s_IsOpening(), s_IsOptional(), s_IsPositional(), s_WriteEscapedStr(), s_WriteXmlLine(), and NStr::SizetToString().
Process argument with specified value.
Implemented in CArgDesc_Alias, CArgDesc_Flag, CArgDescMandatory, and CArgDesc_NameOnly.
Referenced by CArgErrorHandler::HandleError().
|
pure virtual |
Process argument default.
Implemented in CArgDesc_Alias, CArgDesc_Flag, CArgDescDefault, CArgDescOptional, CArgDescMandatory, and CArgDesc_NameOnly.
Referenced by CArgDescriptions::x_PostCheck().
Remove argument of name "name".
Definition at line 1903 of file ncbiargs.cpp.
References set< Key, Compare >::erase(), set< Key, Compare >::find(), and CArgs::m_Args.
Referenced by CArgs::Add(), and CPsiBlastApp::x_RunLocalPsiBlastIterations().
void CArgs::Reset | ( | void | ) |
Remove all arguments.
Definition at line 1910 of file ncbiargs.cpp.
References set< Key, Compare >::clear(), CArgs::m_Args, and CArgs::m_nExtra.
Referenced by CTbl2AsnApp::Run().
|
inline |
Clear the selected usage flags.
Definition at line 1045 of file ncbiargs.hpp.
References flags, and CArgDescriptions::m_MiscFlags.
Referenced by CArgDescriptions::PrintUsageIfNoArgs(), and CArgDescriptions::SetUsageContext().
|
inline |
Definition at line 1123 of file ncbiargs.hpp.
void CArgDescriptions::SetArgsType | ( | EArgSetType | args_type | ) |
Set type of argument description (cmdline vs CGI).
Method performs verification of arguments, throws an exception if it finds positional args set for a CGI
Definition at line 2361 of file ncbiargs.cpp.
References CArgDescriptions::eCgiArgs, CArgDescriptions::m_ArgsType, CArgDescriptions::m_nExtra, CArgDescriptions::m_nExtraOpt, CArgDescriptions::m_PosArgs, and NCBI_THROW.
Referenced by CCgiApplication::SetupArgDescriptions().
|
inlineprivate |
Definition at line 1450 of file ncbiargs.hpp.
Set current command.
Definition at line 473 of file ncbiargs.hpp.
References command, and CArgs::m_Command.
Referenced by CCommandArgDescriptions::CreateArgs().
|
virtual |
Set argument constraint.
constraint | The constraint object. ATTN: A CRef must always be taken on the object by the derived class's implementation of this method! |
Reimplemented in CArgDescMandatory.
Definition at line 945 of file ncbiargs.cpp.
References CArgDesc::GetName(), CArgAllow::GetUsage(), kEmptyStr, NCBI_THROW, and s_ArgExptMsg().
void CArgDescriptions::SetConstraint | ( | const string & | name, |
const CArgAllow & | constraint, | ||
EConstraintNegate | negate = eConstraint |
||
) |
This version of SetConstraint doesn't take the ownership of object 'constraint'.
Rather, it creates and uses a clone of the object.
Definition at line 2605 of file ncbiargs.cpp.
References CArgAllow::Clone(), CArgDescriptions::eConstraint, NCBI_THROW, and CArgDescriptions::SetConstraint().
void CArgDescriptions::SetConstraint | ( | const string & | name, |
const CArgAllow * | constraint, | ||
EConstraintNegate | negate = eConstraint |
||
) |
Set additional user defined constraint on argument value.
Constraint is defined by CArgAllow and its derived classes. The constraint object must be allocated by "new", and it must NOT be freed by "delete" after it has been passed to CArgDescriptions!
name | Name of the parameter(flag) to check |
constraint | The constraint object. NOTE: A CRef will always be taken on the object, and its lifetime will be controlled by the CObject's smart-pointer mechanism. |
negate | Flag indicates if this is inverted(NOT) constaint |
Definition at line 2591 of file ncbiargs.cpp.
References CArgDescriptions::eConstraint, set< Key, Compare >::end(), CArgDescriptions::m_Args, NCBI_THROW, and CArgDescriptions::x_Find().
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CWinMaskConfig::AddWinMaskArgs(), CAVApp::Init(), SUApp::Init(), Cn3DNoWin::Init(), CId2FetchApp::Init(), CDbapiTestSpeedApp::InitSample(), s_InitDataOnly(), CPsgClientApp::s_InitRequest(), CStdCmdLineArgs::SetArgumentDescriptions(), CTaskCmdLineArgs::SetArgumentDescriptions(), CWindowSizeArg::SetArgumentDescriptions(), COffDiagonalRangeArg::SetArgumentDescriptions(), CWordThresholdArg::SetArgumentDescriptions(), CRMBlastNArg::SetArgumentDescriptions(), CGenericSearchArgs::SetArgumentDescriptions(), CNuclArgs::SetArgumentDescriptions(), CDiscontiguousMegablastArgs::SetArgumentDescriptions(), CLargestIntronSizeArgs::SetArgumentDescriptions(), CFrameShiftArgs::SetArgumentDescriptions(), CGeneticCodeArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CMappingArgs::SetArgumentDescriptions(), CQueryOptionsArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CIgBlastArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CMTArgs::SetArgumentDescriptions(), CHspFilteringArgs::SetArgumentDescriptions(), CMapperGenericSearchArgs::SetArgumentDescriptions(), CMapperNuclArgs::SetArgumentDescriptions(), CMapperLargestIntronSizeArgs::SetArgumentDescriptions(), CArgDescriptions::SetConstraint(), CSplignArgUtil::SetupArgDescriptions(), CCompartOptions::SetupArgDescriptions(), CProSplignOutputOptions::SetupArgDescriptions(), CDBLBClientApp::x_InitLookup(), CDBLBClientApp::x_InitWhereIs(), and CTbl2AsnApp::x_SetAlnArgs().
Set current command group name.
When printing help, commands will be arranged by group name.
Definition at line 3989 of file ncbiargs.cpp.
References CCommandArgDescriptions::m_CmdGroups, CCommandArgDescriptions::m_CurrentCmdGroup, and CCommandArgDescriptions::x_GetCommandGroupIndex().
Referenced by CCommandArgDescriptions::AddCommand().
Set current arguments group name.
When printing descriptions for optional arguments (on -help command), they will be arranged by group name. Empty group name resets the group. Arguments without group are listed first immediately after mandatory arguments.
Definition at line 2632 of file ncbiargs.cpp.
References CArgDescriptions::m_ArgGroups, CArgDescriptions::m_CurrentGroup, and CArgDescriptions::x_GetGroupIndex().
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CGenomicCollectionsService::AddArguments(), CWinMaskConfig::AddWinMaskArgs(), CArgDescriptions::CreateArgs(), CStdCmdLineArgs::SetArgumentDescriptions(), CTaskCmdLineArgs::SetArgumentDescriptions(), CWindowSizeArg::SetArgumentDescriptions(), COffDiagonalRangeArg::SetArgumentDescriptions(), CWordThresholdArg::SetArgumentDescriptions(), CRMBlastNArg::SetArgumentDescriptions(), CMatrixNameArg::SetArgumentDescriptions(), CGenericSearchArgs::SetArgumentDescriptions(), CFilteringArgs::SetArgumentDescriptions(), CNuclArgs::SetArgumentDescriptions(), CDiscontiguousMegablastArgs::SetArgumentDescriptions(), CCompositionBasedStatsArgs::SetArgumentDescriptions(), CGappedArgs::SetArgumentDescriptions(), CLargestIntronSizeArgs::SetArgumentDescriptions(), CFrameShiftArgs::SetArgumentDescriptions(), CGeneticCodeArgs::SetArgumentDescriptions(), CGapTriggerArgs::SetArgumentDescriptions(), CPssmEngineArgs::SetArgumentDescriptions(), CSearchStrategyArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CPhiBlastArgs::SetArgumentDescriptions(), CKBlastpArgs::SetArgumentDescriptions(), CDeltaBlastArgs::SetArgumentDescriptions(), CMappingArgs::SetArgumentDescriptions(), CQueryOptionsArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CIgBlastArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CMTArgs::SetArgumentDescriptions(), CRemoteArgs::SetArgumentDescriptions(), CDebugArgs::SetArgumentDescriptions(), CHspFilteringArgs::SetArgumentDescriptions(), CMbIndexArgs::SetArgumentDescriptions(), CSRASearchModeArgs::SetArgumentDescriptions(), CMapperStdCmdLineArgs::SetArgumentDescriptions(), CMapperGenericSearchArgs::SetArgumentDescriptions(), CMapperNuclArgs::SetArgumentDescriptions(), CMapperLargestIntronSizeArgs::SetArgumentDescriptions(), CInputStreamSource::SetStandardInputArgs(), CAdvancedAlignCleanup::SetupArgDescriptions(), CSplignArgUtil::SetupArgDescriptions(), CAlignCollapser::SetupArgDescriptions(), CGnomonAnnotatorArgUtil::SetupArgDescriptions(), and CChainerArgUtil::SetupArgDescriptions().
void CArgDescriptions::SetDependency | ( | const string & | arg1, |
EDependency | dep, | ||
const string & | arg2 | ||
) |
Define a dependency.
If arg1 was specified and requires arg2, arg2 is treated as a mandatory one even if was defined as optional. If arg1 excludes arg2, arg2 must not be set even if it's mandatory. This allows to create a set of arguments exactly one of which must be set.
Definition at line 2618 of file ncbiargs.cpp.
References CArgDescriptions::eExcludes, multimap_checker< Container >::insert(), and CArgDescriptions::m_Dependencies.
Referenced by CFlatFileConfig::AddArgumentDescriptions(), CLocalTaxon::AddArguments(), s_AddLatencyOptions(), s_InitDataFlags(), s_InitDataOnly(), CPsgClientApp::s_InitRequest(), CStdCmdLineArgs::SetArgumentDescriptions(), CDiscontiguousMegablastArgs::SetArgumentDescriptions(), CFrameShiftArgs::SetArgumentDescriptions(), CSearchStrategyArgs::SetArgumentDescriptions(), CPsiBlastArgs::SetArgumentDescriptions(), CPhiBlastArgs::SetArgumentDescriptions(), CDeltaBlastArgs::SetArgumentDescriptions(), CMapperQueryOptionsArgs::SetArgumentDescriptions(), CBlastDatabaseArgs::SetArgumentDescriptions(), CFormattingArgs::SetArgumentDescriptions(), CMapperFormattingArgs::SetArgumentDescriptions(), CMTArgs::SetArgumentDescriptions(), CHspFilteringArgs::SetArgumentDescriptions(), CMapperStdCmdLineArgs::SetArgumentDescriptions(), CMapperGenericSearchArgs::SetArgumentDescriptions(), CInputStreamSource::SetStandardInputArgs(), CAdvancedAlignCleanup::SetupArgDescriptions(), CCompartOptions::SetupArgDescriptions(), CDBLBClientApp::x_InitLookup(), and CTbl2AsnApp::x_SetAlnArgs().
Set detailed usage description.
In short help message, program will print short description defined in SetUsageContext method. In detailed help message, program will use detailed description defined here.
usage_description | Detailed usage description |
Definition at line 3333 of file ncbiargs.cpp.
References CArgDescriptions::m_DetailedDescription.
|
inlinevirtual |
Set error handler for the argument.
Reimplemented in CArgDescMandatory.
Definition at line 1885 of file ncbiargs.hpp.
Referenced by CArgDescriptions::x_AddDesc().
void CArgDescriptions::SetErrorHandler | ( | const string & | name, |
CArgErrorHandler * | err_handler | ||
) |
Set individual error handler for the argument.
The handler overrides the default one (if any) provided through the constructor. The same handler may be shared by several arguments. The handler object must be allocated by "new", and it must NOT be freed by "delete" after it has been passed to CArgDescriptions!
name | Name of the parameter (flag) to set handler for |
err_handler | Error handler |
Definition at line 2642 of file ncbiargs.cpp.
References set< Key, Compare >::end(), err_handler(), CArgDescriptions::m_Args, NCBI_THROW, and CArgDescriptions::x_Find().
|
inlinevirtual |
Set argument group.
Reimplemented in CArgDesc_Flag, and CArgDescOptional.
Definition at line 1845 of file ncbiargs.hpp.
Referenced by CArgDescriptions::x_AddDesc().
CArgDependencyGroup & CArgDependencyGroup::SetMaxMembers | ( | size_t | max_members | ) |
max_members | No more than "max_members" of members (args or immediate groups listed in this group) are allowed to be in the "set" state. If this condition is not met, then this group will be marked as "not set". |
Definition at line 4920 of file ncbiargs.cpp.
References CArgDependencyGroup::m_MaxMembers.
CArgDependencyGroup & CArgDependencyGroup::SetMinMembers | ( | size_t | min_members | ) |
min_members | Mark this group as "set" (in the context of CArgDescriptions::EDependency) if at least "min_members" of its members (args or groups listed in this group) are set. |
Definition at line 4914 of file ncbiargs.cpp.
References CArgDependencyGroup::m_MinMembers.
|
inline |
Set the selected flags.
Definition at line 1039 of file ncbiargs.hpp.
References flags, and CArgDescriptions::m_MiscFlags.
Referenced by CArgDescriptions::PrintUsageIfNoArgs(), and CArgDescriptions::SetUsageContext().
|
inlineprotected |
Definition at line 340 of file ncbiargs.hpp.
References CArgValue::m_Ordinal.
Referenced by CArgs::Add().
|
inline |
Select mode for processing positional arguments.
Definition at line 582 of file ncbiargs.hpp.
References CArgDescriptions::m_PositionalMode.
|
virtual |
Get reference on value list for further modification.
Reimplemented in CArg_String.
Definition at line 167 of file ncbiargs.cpp.
References CArgValue::m_Name, and NCBI_THROW.
Referenced by CArgs::Add(), and CArgDescriptions::ConvertKeys().
void CArgDescriptions::SetUsageContext | ( | const string & | usage_name, |
const string & | usage_description, | ||
bool | usage_sort_args = false , |
||
SIZE_TYPE | usage_width = 78 |
||
) |
Set extra info to be used by PrintUsage().
If "usage_name" is empty, it will be initialized using CNcbiApplicationAPI::GetProgramDisplayName
usage_name | Program name |
usage_description | Usage descr. |
usage_sort_args | Sort args. |
Definition at line 3303 of file ncbiargs.cpp.
References NStr::eNocase, ERR_POST_X, CArgDescriptions::fUsageSortArgs, CNcbiApplicationAPI::GetProgramDisplayName(), CNcbiApplicationAPI::Instance(), CArgDescriptions::m_UsageDescription, CArgDescriptions::m_UsageName, CArgDescriptions::m_UsageWidth, CArgDescriptions::ResetMiscFlags(), CArgDescriptions::SetMiscFlags(), NStr::TrimSuffixInPlace(), and Warning().
Referenced by COMSSA::AppInit(), CArgDescriptions::CArgDescriptions(), CSdbapiTest::Init(), CAVApp::Init(), Cn3DNoWin::Init(), CId2FetchApp::Init(), CNcbiTestApplication::Init(), CSdbapiSimpleApp::Init(), CProgramDescriptionArgs::SetArgumentDescriptions(), CIgBlastProgramDescriptionArgs::SetArgumentDescriptions(), CMapperProgramDescriptionArgs::SetArgumentDescriptions(), CDBLBClientApp::x_InitLookup(), CDBLBClientApp::x_InitWhatIs(), and CDBLBClientApp::x_InitWhereIs().
CArgDescriptions * CArgDescriptions::ShowAllArguments | ( | bool | show_all | ) |
Include hidden arguments into USAGE.
Definition at line 2353 of file ncbiargs.cpp.
References CArgDescriptions::GetAllDescriptions(), and CArgDescriptions::m_HasHidden.
Verify if specified value is allowed.
Implements CArgAllow.
Reimplemented in CArgAllow_String.
Definition at line 4445 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Symbols::m_SymClass, pi, s_IsAllowedSymbol(), and rapidjson::value.
Verify if specified value is allowed.
Reimplemented from CArgAllow_Symbols.
Definition at line 4528 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Symbols::m_SymClass, pi, s_IsAllowedSymbol(), and rapidjson::value.
Verify if specified value is allowed.
Implements CArgAllow.
Definition at line 4605 of file ncbiargs.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), CArgAllow_Strings::m_Strings, and rapidjson::value.
Verify if specified value is allowed.
Implements CArgAllow.
Definition at line 4686 of file ncbiargs.cpp.
References ITERATE, CArgAllow_Int8s::m_MinMax, pi, s_StringToInt8(), val, and rapidjson::value.
Verify if specified value is allowed.
Implements CArgAllow.
Definition at line 4821 of file ncbiargs.cpp.
References NStr::fDecimalPosixOrLocal, ITERATE, CArgAllow_Doubles::m_MinMax, pi, NStr::StringToDouble(), val, and rapidjson::value.
value | Argument value to match against the Perl regular expression |
Implements CArgAllow.
Definition at line 60 of file arg_regexp.cpp.
References CArgAllow_Regexp::m_Regexp, and rapidjson::value.
Verify if specified value is allowed.
Implemented in CArgAllowGeneticCodeInteger, CArgAllow_Regexp, CArgAllow_Doubles, CArgAllow_Int8s, CArgAllow_Strings, CArgAllow_String, CArgAllow_Symbols, CArgAllowStringSet, CArgAllowIntegerSet, CArgAllowValuesBetween, CArgAllowValuesLessThanOrEqual, CArgAllowValuesGreaterThanOrEqual, and CArgAllowMaximumFileNameLength.
Referenced by CArgDescMandatory::ProcessArgument().
|
virtual |
Verify argument default value.
Reimplemented in CArgDescDefault.
Definition at line 939 of file ncbiargs.cpp.
Referenced by CArgDescriptions::x_PreCheck().
Verify if argument "name" is spelled correctly.
Argument name can contain only alphanumeric characters, dashes ('-') and underscore ('_'), or be empty. If the leading dash is present, it must be followed by a non-dash char ('-' or '–foo' are not valid names).
Definition at line 3338 of file ncbiargs.cpp.
References isdigit(), and s_IsArgNameChar().
Referenced by CArgs::Add(), CArgDesc::CArgDesc(), CArgValue::CArgValue(), and CArgDescriptions::x_CreateArg().
|
private |
Helper method for adding description.
Definition at line 3368 of file ncbiargs.cpp.
References _ASSERT, CArgDescriptions::Exist(), CArgDescriptions::fHidden, CArgDescriptions::fOptionalSeparator, CArgDesc::GetFlags(), CArgDesc::GetName(), CRef< C, Locker >::GetPointerOrNull(), set< Key, Compare >::insert(), CArgDescriptions::m_Args, CArgDescriptions::m_CurrentGroup, CArgDescriptions::m_ErrorHandler, CArgDescriptions::m_HasHidden, CArgDescriptions::m_KeyFlagArgs, CArgDescriptions::m_NoSeparator, CArgDescriptions::m_OpeningArgs, CArgDescriptions::m_PosArgs, NCBI_THROW, s_IsAlias(), s_IsFlag(), s_IsKey(), s_IsOpening(), s_IsOptional(), CArgDesc::SetErrorHandler(), CArgDesc::SetGroup(), and CArgDescriptions::x_Find().
Referenced by CArgDescriptions::AddAlias(), CArgDescriptions::AddDefaultKey(), CArgDescriptions::AddDefaultPositional(), CArgDescriptions::AddExtra(), CArgDescriptions::AddFlag(), CArgDescriptions::AddKey(), CArgDescriptions::AddNegatedFlagAlias(), CArgDescriptions::AddOpening(), CArgDescriptions::AddOptionalKey(), CArgDescriptions::AddOptionalPositional(), and CArgDescriptions::AddPositional().
Helper method for checking if auto help requested and throw CArgHelpException if help requested.
Definition at line 2840 of file ncbiargs.cpp.
References kEmptyStr, CArgDescriptions::m_AutoHelp, NCBI_THROW, s_AutoHelp, s_AutoHelpFull, s_AutoHelpShowAll, and s_AutoHelpXml.
Referenced by CCommandArgDescriptions::CreateArgs(), and CArgDescriptions::CreateArgs().
|
private |
Process arguments.
Helper method to process arguments and build a CArgs object that is passed as the args parameter.
arg1 | Argument to process |
have_arg2 | Is there an arg. that follows? |
arg2 | Following argument |
n_plain | Indicates number of args |
args | Contains processed args |
Definition at line 2857 of file ncbiargs.cpp.
References set< Key, Compare >::end(), CArgDescriptions::ePositionalMode_Loose, eq(), CArgs::GetAll(), kEmptyStr, kMax_UInt, CArgDescriptions::m_Args, CArgDescriptions::m_nExtra, CArgDescriptions::m_nExtraOpt, CArgDescriptions::m_OpeningArgs, CArgDescriptions::m_PosArgs, CArgDescriptions::m_PositionalMode, NCBI_THROW, NPOS, s_ArgDelimiter, NStr::UIntToString(), CArgDescriptions::VerifyName(), and CArgDescriptions::x_Find().
Referenced by CArgDescriptions::ConvertKeys(), and CArgDescriptions::CreateArgs().
|
private |
|
private |
Definition at line 4944 of file ncbiargs.cpp.
References map_checker< Container >::begin(), set< Key, Compare >::begin(), CArgDependencyGroup::eInstantSet, map_checker< Container >::end(), CArgs::Exist(), i, set< Key, Compare >::insert(), NStr::Join(), CArgDependencyGroup::m_Arguments, CArgDependencyGroup::m_Groups, CArgDependencyGroup::m_MaxMembers, CArgDependencyGroup::m_MinMembers, msg(), NCBI_THROW, result, map_checker< Container >::size(), and set< Key, Compare >::size().
Referenced by CArgDependencyGroup::Evaluate().
|
private |
Definition at line 1802 of file ncbiargs.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), CArgs::m_Args, and s_IsArgNameChar().
|
private |
Find argument value with name "name".
Definition at line 1792 of file ncbiargs.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), CArgs::m_Args, and s_IsArgNameChar().
Referenced by CArgs::Add(), CArgs::Exist(), and CArgs::operator[]().
|
private |
Helper method to find named parameter.
'negative' (if provided) will indicate if the name referred to a negative alias.
Definition at line 2736 of file ncbiargs.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), CArgDesc_Alias::GetAliasedName(), CArgDesc_Alias::GetNegativeFlag(), CArgDescriptions::m_Args, and negative().
Referenced by CArgDescriptions::AddNegatedFlagAlias(), CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::Delete(), CArgDescriptions::Exist(), CArgDescriptions::SetConstraint(), CArgDescriptions::SetErrorHandler(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_Find(), CArgDescriptions::x_IsMultiArg(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PreCheck().
|
private |
Helper method to find named parameter – const version.
'negative' (if provided) will indicate if the name referred to a negative alias.
Definition at line 2718 of file ncbiargs.cpp.
References set< Key, Compare >::end(), set< Key, Compare >::find(), CArgDesc_Alias::GetAliasedName(), CArgDesc_Alias::GetNegativeFlag(), CArgDescriptions::m_Args, negative(), and CArgDescriptions::x_Find().
Definition at line 4003 of file ncbiargs.cpp.
References NStr::EqualNocase(), g(), i, ITERATE, and CCommandArgDescriptions::m_CmdGroups.
Referenced by CCommandArgDescriptions::PrintUsage(), CCommandArgDescriptions::PrintUsageXml(), and CCommandArgDescriptions::SetCurrentCommandGroup().
Get group index.
Returns group index in the m_ArgGroups, 0 for empty group name or the next group number for undefined group.
Definition at line 2755 of file ncbiargs.cpp.
References NStr::EqualNocase(), i, and CArgDescriptions::m_ArgGroups.
Referenced by CArgDescriptions::SetCurrentGroup().
Definition at line 4065 of file ncbiargs.cpp.
References a, map_checker< Container >::begin(), cmd, command, map_checker< Container >::end(), map_checker< Container >::find(), kEmptyStr, CCommandArgDescriptions::m_Aliases, CCommandArgDescriptions::m_Description, and NStr::StartsWith().
Referenced by CCommandArgDescriptions::CreateArgs(), and CCommandArgDescriptions::PrintUsage().
|
private |
Definition at line 3998 of file ncbiargs.cpp.
References CCommandArgDescriptions::eCommandOptional, and CCommandArgDescriptions::m_Cmd_req.
Referenced by CCommandArgDescriptions::AddStdArguments(), CCommandArgDescriptions::CreateArgs(), CCommandArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsageXml().
Returns TRUE if parameter supports multiple arguments.
Definition at line 3145 of file ncbiargs.cpp.
References set< Key, Compare >::end(), CArgDescriptions::fAllowMultiple, CArgDesc::GetFlags(), CArgDescriptions::m_Args, and CArgDescriptions::x_Find().
Referenced by CArgDescriptions::ConvertKeys().
|
private |
Helper method for doing post-processing consistency checks.
Definition at line 3162 of file ncbiargs.cpp.
References CArgs::Add(), set< Key, Compare >::begin(), CArgDescriptions::eCgiArgs, CArgDescriptions::eConstraint, CArgDescriptions::eConvertKeys, CArgDescriptions::eExcludes, map_checker< Container >::end(), set< Key, Compare >::end(), CArgDescriptions::eRequires, CArgs::Exist(), map_checker< Container >::find(), set< Key, Compare >::find(), CArgDescriptions::fUsageIfNoArgs, CArgDescriptions::GetArgsType(), CArgDesc::GetName(), i, map_checker< Container >::insert(), set< Key, Compare >::insert(), CArgs::IsEmpty(), CArgDescriptions::IsSetMiscFlag(), ITERATE, kEmptyStr, CArgDescriptions::m_Dependencies, CArgDescriptions::m_DependencyGroups, CArgDescriptions::m_KeyFlagArgs, CArgDescriptions::m_nExtra, CArgDescriptions::m_OpeningArgs, CArgDescriptions::m_PosArgs, max(), NCBI_THROW, NStr::NumericToString(), CArgDesc::ProcessDefault(), s_ArgExptMsg(), NStr::StringToUInt(), NStr::UIntToString(), and CArgDescriptions::x_Find().
Referenced by CArgDescriptions::ConvertKeys(), and CArgDescriptions::CreateArgs().
|
private |
Helper method for doing pre-processing consistency checks.
Definition at line 2769 of file ncbiargs.cpp.
References _ASSERT, a, set< Key, Compare >::begin(), CArgDescriptions::eConstraint, set< Key, Compare >::end(), CArgDescriptions::fOptionalSeparator, CArgDescriptions::fOptionalSeparatorAllowConflict, CArgDesc::GetName(), i, CArgDescriptions::m_Args, CArgDescriptions::m_nExtra, CArgDescriptions::m_NoSeparator, CArgDescriptions::m_PosArgs, n, NCBI_RETHROW, NCBI_THROW, NPOS, CArgDesc::VerifyDefault(), CException::what(), and CArgDescriptions::x_Find().
Referenced by CArgDescriptions::ConvertKeys(), and CArgDescriptions::CreateArgs().
|
private |
Definition at line 3959 of file ncbiargs.cpp.
References a, CArgDesc_Alias::GetAliasedName(), CArgDesc::GetName(), CArgDesc_Alias::GetNegativeFlag(), ITERATE, CArgDescriptions::m_Args, out(), s_IsAlias(), s_WriteXmlLine(), and tag.
Referenced by CArgDescriptions::CPrintUsageXml::PrintArguments().
|
private |
Definition at line 3428 of file ncbiargs.cpp.
References arr, CArgDescriptions::eExcludes, CArgDescriptions::eInputFile, multimap_checker< Container >::equal_range(), CArgDescriptions::eRequires, CArgDescriptions::fConfidential, CArgDescriptions::fMandatorySeparator, NStr::fWrap_Hyphenate, CArgDesc_Alias::GetAliasedName(), CArgDesc::GetComment(), CArgDescDefault::GetDisplayValue(), CArgDesc::GetFlags(), CArgDesc::GetName(), CArgDesc_Alias::GetNegativeFlag(), CArgDesc_Flag::GetSetValue(), CArgDescriptions::GetTypeName(), CArgDesc::GetUsageCommentAttr(), CArgDesc::GetUsageSynopsis(), indent(), ITERATE, kEmptyStr, CArgDescriptions::m_Args, CArgDescriptions::m_Dependencies, NPOS, s_IsFlag(), s_IsPositional(), s_PrintCommentBody(), t, and NStr::Wrap().
Definition at line 181 of file ncbiargs.cpp.
References CArgValue::fArgValue_FromDefault, CArgValue::fArgValue_HasDefault, CArgValue::m_Default, and CArgValue::m_Flags.
Referenced by CArgDescMandatory::ProcessArgument(), CArgDesc_Flag::ProcessArgument(), CArgDescDefault::ProcessDefault(), and CArgDesc_Flag::ProcessDefault().
|
virtual |
Definition at line 4342 of file ncbiargs.cpp.
|
virtual |
Definition at line 54 of file arg_regexp.cpp.
|
virtual |
Definition at line 4910 of file ncbiargs.cpp.
|
virtual |
Destructor.
Definition at line 933 of file ncbiargs.cpp.
|
virtual |
Destructor.
Definition at line 2224 of file ncbiargs.cpp.
CArgs::~CArgs | ( | void | ) |
Destructor.
Definition at line 1755 of file ncbiargs.cpp.
|
protectedvirtual |
Definition at line 161 of file ncbiargs.cpp.
|
virtual |
Destructor.
Definition at line 3985 of file ncbiargs.cpp.
CArgDescriptions::CPrintUsage::~CPrintUsage | ( | ) |
Definition at line 3656 of file ncbiargs.cpp.
CArgDescriptions::CPrintUsageXml::~CPrintUsageXml | ( | ) |
Definition at line 3865 of file ncbiargs.cpp.
command to alias; one alias only
Definition at line 1460 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CCommandArgDescriptions::PrintUsage(), CCommandArgDescriptions::PrintUsageXml(), and CCommandArgDescriptions::x_IdentifyCommand().
string CArgDescriptions::SArgDependency::m_Arg |
Definition at line 1125 of file ncbiargs.hpp.
|
private |
Argument groups.
Definition at line 1141 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CArgDescriptions(), CArgDescriptions::SetCurrentGroup(), and CArgDescriptions::x_GetGroupIndex().
|
private |
Assoc. map of arguments' name/value.
Definition at line 484 of file ncbiargs.hpp.
Referenced by CArgs::Add(), CArgs::Assign(), CArgs::Exist(), CArgs::GetAll(), CArgs::IsEmpty(), CArgs::operator[](), CArgs::Print(), CArgs::Remove(), CArgs::Reset(), and CArgs::x_Find().
|
private |
Assoc.map of arguments' name/descr.
Definition at line 1134 of file ncbiargs.hpp.
Referenced by CArgDescriptions::AddNegatedFlagAlias(), CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::Delete(), CArgDescriptions::Exist(), CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::SetConstraint(), CArgDescriptions::SetErrorHandler(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_Find(), CArgDescriptions::x_IsMultiArg(), CArgDescriptions::x_PreCheck(), CArgDescriptions::x_PrintAliasesAsXml(), and CArgDescriptions::x_PrintComment().
Definition at line 1250 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsage::CPrintUsage().
|
private |
Type of arguments.
Definition at line 1133 of file ncbiargs.hpp.
Referenced by CArgDescriptions::GetArgsType(), and CArgDescriptions::SetArgsType().
|
private |
Definition at line 1969 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::Add(), CArgDependencyGroup::PrintUsage(), CArgDependencyGroup::PrintUsageXml(), and CArgDependencyGroup::x_Evaluate().
|
protected |
Special flag "-h" activated.
Definition at line 1154 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CArgDescriptions::AddStdArguments(), CArgDescriptions::CArgDescriptions(), CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::Delete(), CArgDescriptions::IsAutoHelpEnabled(), CCommandArgDescriptions::PrintUsage(), and CArgDescriptions::x_CheckAutoHelp().
|
private |
Definition at line 1457 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::PrintUsage(), and CCommandArgDescriptions::x_IsCommandMandatory().
|
private |
group names, and order
Definition at line 1462 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::PrintUsage(), CCommandArgDescriptions::PrintUsageXml(), CCommandArgDescriptions::SetCurrentCommandGroup(), and CCommandArgDescriptions::x_GetCommandGroupIndex().
|
private |
Definition at line 486 of file ncbiargs.hpp.
Referenced by CArgs::Assign(), CArgs::GetCommand(), and CArgs::SetCommand().
|
mutableprivate |
current command
Definition at line 1464 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::CreateArgs(), and CCommandArgDescriptions::PrintUsage().
|
private |
command names, and order
Definition at line 1461 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CCommandArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsageXml().
|
private |
Argument description.
Definition at line 1895 of file ncbiargs.hpp.
Referenced by CArgDesc::GetComment().
|
private |
current group #
Definition at line 1463 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), and CCommandArgDescriptions::SetCurrentCommandGroup().
|
private |
Currently selected group (0 = no group)
Definition at line 1142 of file ncbiargs.hpp.
Referenced by CArgDescriptions::SetCurrentGroup(), and CArgDescriptions::x_AddDesc().
|
protected |
Definition at line 348 of file ncbiargs.hpp.
Referenced by CArgValue::GetDefault(), and CArgValue::x_SetDefault().
EDependency CArgDescriptions::SArgDependency::m_Dep |
Definition at line 1126 of file ncbiargs.hpp.
|
private |
Arguments' dependencies.
Definition at line 1144 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::SetDependency(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PrintComment().
|
private |
Definition at line 1146 of file ncbiargs.hpp.
Referenced by CArgDescriptions::AddDependencyGroup(), and CArgDescriptions::x_PostCheck().
|
private |
Definition at line 1249 of file ncbiargs.hpp.
|
private |
Definition at line 1259 of file ncbiargs.hpp.
|
private |
command to ArgDescriptions
Definition at line 1458 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CCommandArgDescriptions::AddStdArguments(), CCommandArgDescriptions::CreateArgs(), CCommandArgDescriptions::GetAllDescriptions(), CCommandArgDescriptions::PrintUsage(), CCommandArgDescriptions::PrintUsageXml(), and CCommandArgDescriptions::x_IdentifyCommand().
|
private |
Definition at line 1967 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::PrintUsage(), and CArgDependencyGroup::PrintUsageXml().
|
protected |
Program long description.
Definition at line 1152 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsageXml::CPrintUsageXml(), and CArgDescriptions::SetDetailedDescription().
|
private |
Global error handler or NULL.
Definition at line 1160 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CArgDescriptions(), and CArgDescriptions::x_AddDesc().
|
protected |
Definition at line 349 of file ncbiargs.hpp.
Referenced by CArgValue::GetDefault(), and CArgValue::x_SetDefault().
|
private |
Definition at line 1896 of file ncbiargs.hpp.
Referenced by CArgDesc::GetFlags().
command to group #
Definition at line 1459 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CCommandArgDescriptions::PrintUsage(), and CCommandArgDescriptions::PrintUsageXml().
|
private |
Definition at line 1970 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::Add(), CArgDependencyGroup::PrintUsage(), CArgDependencyGroup::PrintUsageXml(), and CArgDependencyGroup::x_Evaluate().
|
protected |
Has hidden arguments.
Definition at line 1155 of file ncbiargs.hpp.
Referenced by CCommandArgDescriptions::AddCommand(), CArgDescriptions::AddStdArguments(), CCommandArgDescriptions::AddStdArguments(), CArgDescriptions::CPrintUsage::CPrintUsage(), CCommandArgDescriptions::PrintUsage(), CArgDescriptions::ShowAllArguments(), and CArgDescriptions::x_AddDesc().
|
private |
Key/flag args, in order of insertion.
Definition at line 1137 of file ncbiargs.hpp.
Referenced by CArgDescriptions::ConvertKeys(), CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::Delete(), CArgDescriptions::x_AddDesc(), and CArgDescriptions::x_PostCheck().
|
private |
Definition at line 1968 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::PrintUsage(), CArgDependencyGroup::PrintUsageXml(), CArgDependencyGroup::SetMaxMembers(), and CArgDependencyGroup::x_Evaluate().
Definition at line 1734 of file ncbiargs.hpp.
Referenced by CArgAllow_Int8s::Allow(), CArgAllow_Int8s::AllowRange(), CArgAllow_Int8s::Clone(), CArgAllow_Integers::Clone(), CArgAllow_Int8s::GetUsage(), CArgAllow_Integers::GetUsage(), CArgAllow_Int8s::PrintUsageXml(), and CArgAllow_Int8s::Verify().
Definition at line 1808 of file ncbiargs.hpp.
Referenced by CArgAllow_Doubles::Allow(), CArgAllow_Doubles::AllowRange(), CArgAllow_Doubles::Clone(), CArgAllow_Doubles::GetUsage(), CArgAllow_Doubles::PrintUsageXml(), and CArgAllow_Doubles::Verify().
|
private |
Definition at line 1968 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::PrintUsage(), CArgDependencyGroup::PrintUsageXml(), CArgDependencyGroup::SetMinMembers(), and CArgDependencyGroup::x_Evaluate().
|
private |
Flags for USAGE, error handling etc.
Definition at line 1145 of file ncbiargs.hpp.
Referenced by CArgDescriptions::IsSetMiscFlag(), CArgDescriptions::ResetMiscFlags(), and CArgDescriptions::SetMiscFlags().
|
protected |
Argument name.
Definition at line 346 of file ncbiargs.hpp.
Referenced by CArgs::Add(), CArgValue::CArgValue(), CArgValue::GetName(), and CArgValue::SetStringList().
|
private |
Argument name.
Definition at line 1894 of file ncbiargs.hpp.
Referenced by CArgDesc::CArgDesc(), and CArgDesc::GetName().
|
private |
Definition at line 1966 of file ncbiargs.hpp.
Referenced by CArgDependencyGroup::PrintUsage(), and CArgDependencyGroup::PrintUsageXml().
|
private |
Cached # of unnamed positional arguments.
Definition at line 485 of file ncbiargs.hpp.
Referenced by CArgs::Add(), CArgs::Assign(), CArgs::CArgs(), CArgs::GetNExtra(), CArgs::operator[](), and CArgs::Reset().
|
private |
Definition at line 1139 of file ncbiargs.hpp.
Referenced by CArgDescriptions::AddExtra(), CArgDescriptions::Delete(), CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::SetArgsType(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PreCheck().
|
private |
> # of mandatory extra args
# of optional extra args
Definition at line 1140 of file ncbiargs.hpp.
Referenced by CArgDescriptions::AddExtra(), CArgDescriptions::Delete(), CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::SetArgsType(), and CArgDescriptions::x_CreateArg().
|
private |
Arguments allowed to use no separator.
Definition at line 1138 of file ncbiargs.hpp.
Referenced by CArgDescriptions::x_AddDesc(), and CArgDescriptions::x_PreCheck().
|
private |
Opening args, ordered by position in cmd.-line.
Definition at line 1136 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_CreateArg(), and CArgDescriptions::x_PostCheck().
|
protected |
Definition at line 347 of file ncbiargs.hpp.
Referenced by CArgValue::GetOrdinalPosition(), and CArgValue::SetOrdinalPosition().
|
private |
Definition at line 1260 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsageXml::CPrintUsageXml().
Regexp pattern to match against.
Definition at line 84 of file arg_regexp.hpp.
Referenced by CArgAllow_Regexp::Clone(), CArgAllow_Regexp::GetUsage(), and CArgAllow_Regexp::PrintUsageXml().
|
private |
Pos. args, ordered by position in cmd.-line.
Definition at line 1135 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsage::CPrintUsage(), CArgDescriptions::Delete(), CArgDescriptions::CPrintUsageXml::PrintArguments(), CArgDescriptions::SetArgsType(), CArgDescriptions::x_AddDesc(), CArgDescriptions::x_CreateArg(), CArgDescriptions::x_PostCheck(), and CArgDescriptions::x_PreCheck().
|
private |
Processing of positional args.
Definition at line 1143 of file ncbiargs.hpp.
Referenced by CArgDescriptions::GetPositionalMode(), CArgDescriptions::SetPositionalMode(), and CArgDescriptions::x_CreateArg().
|
private |
Pre-compiled regexp.
Definition at line 85 of file arg_regexp.hpp.
Referenced by CArgAllow_Regexp::Verify().
|
protected |
Set of allowed string values.
Definition at line 1690 of file ncbiargs.hpp.
Referenced by CArgAllow_Strings::Allow(), CArgAllow_Strings::Clone(), CArgAllow_Strings::GetUsage(), CArgAllow_Strings::PrintUsageXml(), and CArgAllow_Strings::Verify().
Definition at line 1581 of file ncbiargs.hpp.
Referenced by CArgAllow_Symbols::Allow(), CArgAllow_Symbols::Clone(), CArgAllow_String::Clone(), CArgAllow_Symbols::GetUsage(), CArgAllow_String::GetUsage(), CArgAllow_Symbols::PrintUsageXml(), CArgAllow_String::PrintUsageXml(), CArgAllow_Symbols::Verify(), and CArgAllow_String::Verify().
|
protected |
Program description.
Definition at line 1151 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsageXml::CPrintUsageXml(), and CArgDescriptions::SetUsageContext().
|
protected |
Program name.
Definition at line 1150 of file ncbiargs.hpp.
Referenced by CArgDescriptions::CPrintUsageXml::CPrintUsageXml(), CArgDescriptions::PrintUsage(), CCommandArgDescriptions::PrintUsage(), and CArgDescriptions::SetUsageContext().
|
protected |
Maximum length of a usage line.
Definition at line 1153 of file ncbiargs.hpp.
Referenced by CArgDescriptions::SetUsageContext().
|
friend |
Definition at line 332 of file ncbiargs.hpp.
|
friend |
Definition at line 330 of file ncbiargs.hpp.
|
friend |
Definition at line 331 of file ncbiargs.hpp.
|
friend |
Definition at line 329 of file ncbiargs.hpp.
|
friend |
Definition at line 491 of file ncbiargs.hpp.
|
friend |
Definition at line 1156 of file ncbiargs.hpp.