A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__Args.html below:

NCBI C++ ToolKit: Command-Line Argument Processing

enum   CArgException::EErrCode {
  CArgException::eInvalidArg , CArgException::eNoValue , CArgException::eExcludedValue , CArgException::eWrongCast ,
  CArgException::eConvert , CArgException::eNoFile , CArgException::eConstraint , CArgException::eArgType ,
  CArgException::eNoArg , CArgException::eSynopsis
}   Error types for improperly formatted arguments. More...
  enum   CArgHelpException::EErrCode {
  CArgHelpException::eHelp , CArgHelpException::eHelpFull , CArgHelpException::eHelpShowAll , CArgHelpException::eHelpXml ,
  CArgHelpException::eHelpErr
}   Error type for help exception. More...
  enum   CArgValue::EFileFlags {
  CArgValue::fBinary = (1 << 1) , CArgValue::fText = 0 , CArgValue::fAppend = (1 << 2) , CArgValue::fTruncate = (1 << 12) ,
  CArgValue::fNoCreate = (1 << 11) , CArgValue::fCreatePath = (1 << 8)
}   enum   CArgValue::EArgValueFlags { CArgValue::fArgValue_HasDefault = (1 << 0) , CArgValue::fArgValue_FromDefault = (1 << 1) }   Whether the argument: More...
  enum   CArgDescriptions::EArgSetType { CArgDescriptions::eRegularArgs , CArgDescriptions::eCgiArgs }   Type of CArgDescriptions For a CGI application positional arguments and flags does not make sense (this syntax cannot be expressed by CGI protocol) More...
  enum   CArgDescriptions::EArgPositionalMode { CArgDescriptions::ePositionalMode_Strict , CArgDescriptions::ePositionalMode_Loose }   Processing of positional arguments. More...
  enum   CArgDescriptions::EType {
  CArgDescriptions::eString = 0 , CArgDescriptions::eBoolean , CArgDescriptions::eInt8 , CArgDescriptions::eInteger ,
  CArgDescriptions::eIntId , CArgDescriptions::eDouble , CArgDescriptions::eInputFile , CArgDescriptions::eOutputFile ,
  CArgDescriptions::eIOFile , CArgDescriptions::eDirectory , CArgDescriptions::eDataSize , CArgDescriptions::eDateTime ,
  CArgDescriptions::k_EType_Size
}   Available argument types. More...
  enum   CArgDescriptions::EFlags {
  CArgDescriptions::fPreOpen = (1 << 0) , CArgDescriptions::fBinary = (1 << 1) , CArgDescriptions::fAppend = (1 << 2) , CArgDescriptions::fTruncate = (1 << 12) ,
  CArgDescriptions::fNoCreate = (1 << 11) , CArgDescriptions::fCreatePath = (1 << 8) , CArgDescriptions::fFileFlags = fPreOpen | fBinary | fAppend | fTruncate | fNoCreate | fCreatePath , CArgDescriptions::fAllowMultiple = (1 << 3) ,
  CArgDescriptions::fIgnoreInvalidValue = (1 << 4) , CArgDescriptions::fWarnOnInvalidValue = (1 << 5) , CArgDescriptions::fOptionalSeparator = (1 << 6) , CArgDescriptions::fOptionalSeparatorAllowConflict = (1 << 9) ,
  CArgDescriptions::fMandatorySeparator = (1 << 7) , CArgDescriptions::fHidden = (1 << 10) , CArgDescriptions::fConfidential = (1 << 13) , CArgDescriptions::fStandard = (1 << 14)
}   Additional flags, the first group is file related flags. More...
  enum   CArgDescriptions::EFlagValue { CArgDescriptions::eFlagHasValueIfMissed = 0 , CArgDescriptions::eFlagHasValueIfSet = 1 }   Define how flag presence affect CArgValue::HasValue(). More...
  enum   CArgDescriptions::EConstraintNegate { CArgDescriptions::eConstraintInvert , CArgDescriptions::eConstraint }   Flag to invert constraint logically. More...
  enum   CArgDescriptions::EDependency { CArgDescriptions::eRequires , CArgDescriptions::eExcludes }   Dependencies between arguments. More...
  enum   CArgDescriptions::EMiscFlags {
  CArgDescriptions::fNoUsage = 1 << 0 , CArgDescriptions::fUsageIfNoArgs = 1 << 1 , CArgDescriptions::fUsageSortArgs = 1 << 2 , CArgDescriptions::fDupErrToCerr = 1 << 3 ,
  CArgDescriptions::fMisc_Default = 0
}   Miscellaneous flags. More...
  enum   CArgDescriptions::EHideStdArgs {
  CArgDescriptions::fHideLogfile = 0x01 , CArgDescriptions::fHideConffile = 0x02 , CArgDescriptions::fHideVersion = 0x04 , CArgDescriptions::fHideFullVersion = 0x08 ,
  CArgDescriptions::fHideDryRun = 0x10 , CArgDescriptions::fHideHelp = 0x20 , CArgDescriptions::fHideFullHelp = 0x40 , CArgDescriptions::fHideXmlHelp = 0x80 ,
  CArgDescriptions::fHideAll = 0xFF
}   Which standard flag's descriptions should not be displayed in the usage message. More...
  enum   CArgDescriptions::EPostCheckCaller { CArgDescriptions::eCreateArgs , CArgDescriptions::eConvertKeys }   enum   CCommandArgDescriptions::ECommandArgFlags { CCommandArgDescriptions::eCommandMandatory = 0 , CCommandArgDescriptions::eCommandOptional = 1 , CCommandArgDescriptions::eNoSortCommands = (1<<1) , CCommandArgDescriptions::eNoSortGroups = (1<<2) }   enum   CCommandArgDescriptions::ECommandFlags { CCommandArgDescriptions::eDefault = 0 , CCommandArgDescriptions::eHidden = 1 }   enum   CArgAllow_Symbols::ESymbolClass {
  CArgAllow_Symbols::eAlnum , CArgAllow_Symbols::eAlpha , CArgAllow_Symbols::eCntrl , CArgAllow_Symbols::eDigit ,
  CArgAllow_Symbols::eGraph , CArgAllow_Symbols::eLower , CArgAllow_Symbols::ePrint , CArgAllow_Symbols::ePunct ,
  CArgAllow_Symbols::eSpace , CArgAllow_Symbols::eUpper , CArgAllow_Symbols::eXdigit , CArgAllow_Symbols::eUser
}   Symbol class for defining sets of characters. More...
  enum   CArgDependencyGroup::EInstantSet { CArgDependencyGroup::eNoInstantSet , CArgDependencyGroup::eInstantSet }   Control whether the "setting" of this particular member marks the whole group as "set" regardless of the value passed to SetMinMembers() More...
  virtual const char *  CArgException::GetErrCodeString (void) const override   Translate from the error code value to its string representation. More...
    CArgException::NCBI_EXCEPTION_DEFAULT (CArgException, CCoreException)   virtual const char *  CArgHelpException::GetErrCodeString (void) const override   Translate from the error code value to its string representation. More...
    CArgHelpException::NCBI_EXCEPTION_DEFAULT (CArgHelpException, CArgException)   const stringCArgValue::GetName (void) const   Get argument name. More...
  virtual bool  CArgValue::HasValue (void) const =0   Check if argument holds a value. More...
    CArgValue::DECLARE_OPERATOR_BOOL (HasValue())   Synonym for HasValue(). More...
  virtual const stringCArgValue::AsString (void) const =0   Get the argument's string value. More...
  virtual Int8  CArgValue::AsInt8 (void) const =0   Get the argument's integer (8-byte long) value. More...
  virtual int  CArgValue::AsInteger (void) const =0   Get the argument's integer value. More...
  virtual TIntId  CArgValue::AsIntId (void) const =0   Get the argument's value as an integer id (TIntId). More...
  virtual double  CArgValue::AsDouble (void) const =0   Get the argument's double value. More...
  virtual bool  CArgValue::AsBoolean (void) const =0   Get the argument's boolean value. More...
  virtual CNcbiIstreamCArgValue::AsInputFile (TFileFlags flags=0) const =0   Get the argument as an input file stream. More...
  virtual CNcbiOstreamCArgValue::AsOutputFile (TFileFlags flags=0) const =0   Get the argument as an output file stream. More...
  virtual CNcbiIostreamCArgValue::AsIOFile (TFileFlags flags=0) const =0   Get the argument as a file stream. More...
  virtual const CDirCArgValue::AsDirectory (void) const =0   Get the argument as a directory. More...
  virtual const CTimeCArgValue::AsDateTime (void) const =0   Get the argument as a DateTime. More...
  virtual void  CArgValue::CloseFile (void) const =0   Close the file. More...
  virtual const TStringArrayCArgValue::GetStringList () const   Get the value list. More...
  virtual TStringArrayCArgValue::SetStringList ()   Get reference on value list for further modification. More...
  size_t  CArgValue::GetOrdinalPosition (void) const   Get ordinal position of the value. More...
  const stringCArgValue::GetDefault (TArgValueFlags *flags=NULL) const   Get default value of the argument. More...
  size_t  CArgValue::IsStandard (void) const   Checks that this is a standard/special argument. More...
    CArgValue::CArgValue (const string &name)   Protected constructor and destructor. More...
  virtual  CArgValue::~CArgValue (void)   void  CArgValue::SetOrdinalPosition (size_t pos)   void  CArgValue::x_SetDefault (const string &def_value, bool from_def)   bool  operator< (const CRef< CArgValue > &x, const CRef< CArgValue > &y)     CArgs::CArgs (void)   Constructor. More...
    CArgs::~CArgs (void)   Destructor. More...
    CArgs::CArgs (const CArgs &other)   Creating copy of this object usually makes no sense if it is really required, please use Assign method. More...
  CArgsCArgs::operator= (const CArgs &other)   Creating copy of this object usually makes no sense if it is really required, please use Assign method. More...
  CArgsCArgs::Assign (const CArgs &other)   Copy contents of another object into this one. More...
  bool  CArgs::Exist (const string &name) const   Check existence of argument description. More...
  const CArgValueCArgs::operator[] (const string &name) const   Get value of argument by name. More...
  size_t  CArgs::GetNExtra (void) const   Get the number of unnamed positional (a.k.a. extra) args. More...
  const CArgValueCArgs::operator[] (size_t idx) const   Return N-th extra arg value, N = 1 to GetNExtra(). More...
  vector< CRef< CArgValue > >  CArgs::GetAll (void) const   Get all available arguments. More...
  stringCArgs::Print (string &str) const   Print (append) all arguments to the string "str" and return "str". More...
  void  CArgs::Add (CArgValue *arg, bool update=false, bool add_value=false)   Add new argument name and value. More...
  bool  CArgs::IsEmpty (void) const   Check if there are no arguments in this container. More...
  void  CArgs::Remove (const string &name)   Remove argument of name "name". More...
  void  CArgs::Reset (void)   Remove all arguments. More...
  string  CArgs::GetCommand (void) const   Get current command. More...
  CArgsCArgs::SetCommand (const string &command)   Set current command. More...
  TArgsCI  CArgs::x_Find (const string &name) const   Find argument value with name "name". More...
  TArgsI  CArgs::x_Find (const string &name)   virtual CArgValueCArgErrorHandler::HandleError (const CArgDesc &arg_desc, const string &value) const   Process invalid argument value. More...
    CArgDescriptions::CArgDescriptions (bool auto_help=true, CArgErrorHandler *err_handler=0)   Constructor. More...
  virtual  CArgDescriptions::~CArgDescriptions (void)   Destructor. More...
  void  CArgDescriptions::SetArgsType (EArgSetType args_type)   Set type of argument description (cmdline vs CGI). More...
  EArgSetType  CArgDescriptions::GetArgsType () const   void  CArgDescriptions::SetPositionalMode (EArgPositionalMode positional_mode)   Select mode for processing positional arguments. More...
  EArgPositionalMode  CArgDescriptions::GetPositionalMode () const   static const char *  CArgDescriptions::GetTypeName (EType type)   Get argument type's name. More...
  void  CArgDescriptions::AddKey (const string &name, const string &synopsis, const string &comment, EType type, TFlags flags=0)   Add description for mandatory key. More...
  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. More...
  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. More...
  void  CArgDescriptions::AddFlag (const string &name, const string &comment, CBoolEnum< EFlagValue > set_value=eFlagHasValueIfSet, TFlags flags=0)   Add description for flag argument. More...
  void  CArgDescriptions::AddOpening (const string &name, const string &comment, EType type, TFlags flags=0)   Add description of mandatory opening positional argument. More...
  void  CArgDescriptions::AddPositional (const string &name, const string &comment, EType type, TFlags flags=0)   Add description for mandatory positional argument. More...
  void  CArgDescriptions::AddOptionalPositional (const string &name, const string &comment, EType type, TFlags flags=0)   Add description for optional positional argument without default value. More...
  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. More...
  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. More...
  void  CArgDescriptions::AddAlias (const string &alias, const string &arg_name)   Add argument alias. More...
  void  CArgDescriptions::AddNegatedFlagAlias (const string &alias, const string &arg_name, const string &comment=kEmptyStr)   Add negated alias for a flag argument. More...
  void  CArgDescriptions::AddDependencyGroup (CArgDependencyGroup *dep_group)   Add a dependency group. More...
  void  CArgDescriptions::SetConstraint (const string &name, const CArgAllow *constraint, EConstraintNegate negate=eConstraint)   Set additional user defined constraint on argument value. More...
  void  CArgDescriptions::SetConstraint (const string &name, const CArgAllow &constraint, EConstraintNegate negate=eConstraint)   This version of SetConstraint doesn't take the ownership of object 'constraint'. More...
  void  CArgDescriptions::SetDependency (const string &arg1, EDependency dep, const string &arg2)   Define a dependency. More...
  void  CArgDescriptions::SetCurrentGroup (const string &group)   Set current arguments group name. More...
  void  CArgDescriptions::SetErrorHandler (const string &name, CArgErrorHandler *err_handler)   Set individual error handler for the argument. More...
  bool  CArgDescriptions::Exist (const string &name) const   Check if there is already an argument description with specified name. More...
  void  CArgDescriptions::Delete (const string &name)   Delete description of argument with name "name". More...
  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(). More...
  void  CArgDescriptions::SetDetailedDescription (const string &usage_description)   Set detailed usage description. More...
  void  CArgDescriptions::PrintUsageIfNoArgs (bool do_print=true)   Print usage and exit. More...
  void  CArgDescriptions::SetMiscFlags (TMiscFlags flags)   Set the selected flags. More...
  void  CArgDescriptions::ResetMiscFlags (TMiscFlags flags)   Clear the selected usage flags. More...
  bool  CArgDescriptions::IsSetMiscFlag (EMiscFlags flag) const   Check if the flag is set. More...
  virtual stringCArgDescriptions::PrintUsage (string &str, bool detailed=false) const   Print usage message to end of specified string. More...
  virtual void  CArgDescriptions::PrintUsageXml (CNcbiOstream &out) const   Print argument description in XML format. More...
  static bool  CArgDescriptions::VerifyName (const string &name, bool extended=false)   Verify if argument "name" is spelled correctly. More...
  bool  CArgDescriptions::IsAutoHelpEnabled (void) const   See if special flag "-h" is activated. More...
  CArgDescriptionsCArgDescriptions::ShowAllArguments (bool show_all)   Include hidden arguments into USAGE. More...
  virtual void  CArgDescriptions::AddStdArguments (THideStdArgs mask)   Add standard arguments. More...
  void  CArgDescriptions::AddDefaultFileArguments (const string &default_config)   Add logfile and conffile arguments. More...
    CArgDescriptions::SArgDependency::SArgDependency (const string arg, EDependency dep)   void  CArgDescriptions::x_PrintAliasesAsXml (CNcbiOstream &out, const string &name, bool negated=false) const   TArgsI  CArgDescriptions::x_Find (const string &name, bool *negative=NULL)   Helper method to find named parameter. More...
  TArgsCI  CArgDescriptions::x_Find (const string &name, bool *negative=NULL) const   Helper method to find named parameter – const version. More...
  size_t  CArgDescriptions::x_GetGroupIndex (const string &group) const   Get group index. More...
  void  CArgDescriptions::x_AddDesc (CArgDesc &arg)   Helper method for adding description. More...
  void  CArgDescriptions::x_PreCheck (void) const   Helper method for doing pre-processing consistency checks. More...
  void  CArgDescriptions::x_PrintComment (list< string > &arr, const CArgDesc &arg, SIZE_TYPE width) const   bool  CArgDescriptions::x_CreateArg (const string &arg1, bool have_arg2, const string &arg2, unsigned *n_plain, CArgs &args) const   Process arguments. More...
  bool  CArgDescriptions::x_CreateArg (const string &arg1, const string &name, bool have_arg2, const string &arg2, unsigned int n_plain, CArgs &args, bool update=false, CArgValue **new_value=0) const   void  CArgDescriptions::x_PostCheck (CArgs &args, unsigned int n_plain, EPostCheckCaller caller) const   Helper method for doing post-processing consistency checks. More...
  bool  CArgDescriptions::x_IsMultiArg (const string &name) const   Returns TRUE if parameter supports multiple arguments. More...
  void  CArgDescriptions::x_CheckAutoHelp (const string &arg) const   Helper method for checking if auto help requested and throw CArgHelpException if help requested. More...
    CArgDescriptions::CPrintUsage::CPrintUsage (const CArgDescriptions &desc)     CArgDescriptions::CPrintUsage::~CPrintUsage ()   void  CArgDescriptions::CPrintUsage::AddSynopsis (list< string > &arr, const string &intro, const string &prefix) const   void  CArgDescriptions::CPrintUsage::AddDescription (list< string > &arr, bool detailed) const   void  CArgDescriptions::CPrintUsage::AddCommandDescription (list< string > &arr, const string &cmd, const map< string, string > *aliases, size_t max_cmd_len, bool detailed) const   void  CArgDescriptions::CPrintUsage::AddDetails (list< string > &arr) const     CArgDescriptions::CPrintUsageXml::CPrintUsageXml (const CArgDescriptions &desc, CNcbiOstream &out)     CArgDescriptions::CPrintUsageXml::~CPrintUsageXml ()   void  CArgDescriptions::CPrintUsageXml::PrintArguments (const CArgDescriptions &desc) const   template<class TSize , class TArray > CArgsCArgDescriptions::CreateArgs (TSize argc, TArray argv) const   Create parsed arguments in CArgs object. More...
  virtual CArgsCArgDescriptions::CreateArgs (const CNcbiArguments &argv) const   Parse command-line arguments 'argv' out of CNcbiArguments. More...
  template<class T > void  CArgDescriptions::ConvertKeys (CArgs *args, const T &arg_map, bool update) const   Convert argument map (key-value pairs) into arguments in accordance with the argument descriptions. More...
  virtual list< CArgDescriptions * >  CArgDescriptions::GetAllDescriptions (void)     CCommandArgDescriptions::CCommandArgDescriptions (bool auto_help=true, CArgErrorHandler *err_handler=0, TCommandArgFlags cmd_flags=eCommandMandatory)   Constructor. More...
  virtual  CCommandArgDescriptions::~CCommandArgDescriptions (void)   Destructor. More...
  void  CCommandArgDescriptions::SetCurrentCommandGroup (const string &group)   Set current command group name. More...
  void  CCommandArgDescriptions::AddCommand (const string &cmd, CArgDescriptions *description, const string &alias=kEmptyStr, ECommandFlags flags=eDefault)   Add command argument descriptions. More...
  virtual CArgsCCommandArgDescriptions::CreateArgs (const CNcbiArguments &argv) const   Parse command-line arguments 'argv'. More...
  virtual void  CCommandArgDescriptions::AddStdArguments (THideStdArgs mask)   Add standard arguments. More...
  virtual stringCCommandArgDescriptions::PrintUsage (string &str, bool detailed=false) const   Print usage message to end of specified string. More...
  virtual void  CCommandArgDescriptions::PrintUsageXml (CNcbiOstream &out) const   Print argument description in XML format. More...
  virtual list< CArgDescriptions * >  CCommandArgDescriptions::GetAllDescriptions (void)   void  CCommandArgDescriptions::SetArgsType (EArgSetType)   bool  CCommandArgDescriptions::x_IsCommandMandatory (void) const   size_t  CCommandArgDescriptions::x_GetCommandGroupIndex (const string &group) const   string  CCommandArgDescriptions::x_IdentifyCommand (const string &command) const   virtual bool  CArgAllow::Verify (const string &value) const =0   Verify if specified value is allowed. More...
  virtual string  CArgAllow::GetUsage (void) const =0   Get usage information. More...
  virtual void  CArgAllow::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
  virtual  CArgAllow::~CArgAllow (void)   virtual CArgAllowCArgAllow::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow::CArgAllow (void)     CArgAllow_Symbols::CArgAllow_Symbols (ESymbolClass symbol_class)   Constructor. More...
    CArgAllow_Symbols::CArgAllow_Symbols (const string &symbol_set)   Constructor for user defined eUser class. More...
  CArgAllow_SymbolsCArgAllow_Symbols::Allow (ESymbolClass symbol_class)   Add allowed symbols. More...
  CArgAllow_SymbolsCArgAllow_Symbols::Allow (const string &symbol_set)   virtual bool  CArgAllow_Symbols::Verify (const string &value) const   Verify if specified value is allowed. More...
  virtual string  CArgAllow_Symbols::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_Symbols::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
    CArgAllow_Symbols::CArgAllow_Symbols (void)   virtual CArgAllowCArgAllow_Symbols::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow_String::CArgAllow_String (ESymbolClass symbol_class)   Constructor. More...
    CArgAllow_String::CArgAllow_String (const string &symbol_set)   Constructor for user defined eUser class. More...
  virtual bool  CArgAllow_String::Verify (const string &value) const   Verify if specified value is allowed. More...
  virtual string  CArgAllow_String::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_String::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
    CArgAllow_String::CArgAllow_String (void)   virtual CArgAllowCArgAllow_String::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow_Strings::CArgAllow_Strings (NStr::ECase use_case=NStr::eCase)   Constructor. More...
    CArgAllow_Strings::CArgAllow_Strings (initializer_list< string > values, NStr::ECase use_case=NStr::eCase)   Constructor. More...
  CArgAllow_StringsCArgAllow_Strings::Allow (const string &value)   Add allowed string values. More...
  CArgAllow_StringsCArgAllow_Strings::AllowValue (const string &value)   Add allowed string values. More...
  CArgAllow_StringsCArgAllow_Strings::operator, (const string &value)   Short notation operator for adding allowed string values. More...
  virtual bool  CArgAllow_Strings::Verify (const string &value) const   Verify if specified value is allowed. More...
  virtual string  CArgAllow_Strings::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_Strings::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
  virtual CArgAllowCArgAllow_Strings::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow_Int8s::CArgAllow_Int8s (Int8 x_value)   Constructor specifying an allowed integer value. More...
    CArgAllow_Int8s::CArgAllow_Int8s (Int8 x_min, Int8 x_max)   Constructor specifying range of allowed integer values. More...
  CArgAllow_Int8sCArgAllow_Int8s::AllowRange (Int8 from, Int8 to)   Add allow values. More...
  CArgAllow_Int8sCArgAllow_Int8s::Allow (Int8 value)   virtual bool  CArgAllow_Int8s::Verify (const string &value) const   Verify if specified value is allowed. More...
  virtual string  CArgAllow_Int8s::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_Int8s::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
    CArgAllow_Int8s::CArgAllow_Int8s (void)   virtual CArgAllowCArgAllow_Int8s::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow_Integers::CArgAllow_Integers (int x_value)   Constructor specifying an allowed integer value. More...
    CArgAllow_Integers::CArgAllow_Integers (int x_min, int x_max)   Constructor specifying range of allowed integer values. More...
  virtual string  CArgAllow_Integers::GetUsage (void) const   Get usage information. More...
    CArgAllow_Integers::CArgAllow_Integers (void)   virtual CArgAllowCArgAllow_Integers::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgAllow_Doubles::CArgAllow_Doubles (double x_value)   Constructor specifying an allowed double value. More...
    CArgAllow_Doubles::CArgAllow_Doubles (double x_min, double x_max)   Constructor specifying range of allowed double values. More...
  CArgAllow_DoublesCArgAllow_Doubles::AllowRange (double from, double to)   Add allowed values. More...
  CArgAllow_DoublesCArgAllow_Doubles::Allow (double value)   virtual bool  CArgAllow_Doubles::Verify (const string &value) const   Verify if specified value is allowed. More...
  virtual string  CArgAllow_Doubles::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_Doubles::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
    CArgAllow_Doubles::CArgAllow_Doubles (void)   virtual CArgAllowCArgAllow_Doubles::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
    CArgDesc::CArgDesc (const string &name, const string &comment, CArgDescriptions::TFlags flags=0)   Constructor. More...
  virtual  CArgDesc::~CArgDesc (void)   Destructor. More...
  const stringCArgDesc::GetName (void) const   Get argument name. More...
  const stringCArgDesc::GetComment (void) const   Get argument description. More...
  virtual size_t  CArgDesc::GetGroup (void) const   Get argument group. More...
  virtual void  CArgDesc::SetGroup (size_t)   Set argument group. More...
  virtual string  CArgDesc::GetUsageSynopsis (bool name_only=false) const =0   Get usage synopsis. More...
  virtual string  CArgDesc::GetUsageCommentAttr (void) const =0   Get usage comment attribute. More...
  virtual CArgValueCArgDesc::ProcessArgument (const string &value) const =0   Process argument with specified value. More...
  virtual CArgValueCArgDesc::ProcessDefault (void) const =0   Process argument default. More...
  virtual void  CArgDesc::VerifyDefault (void) const   Verify argument default value. More...
  virtual void  CArgDesc::SetConstraint (const CArgAllow *constraint, CArgDescriptions::EConstraintNegate negate=CArgDescriptions::eConstraint)   Set argument constraint. More...
  virtual bool  CArgDesc::IsConstraintInverted () const   Returns TRUE if associated constraint is inverted (NOT) More...
  virtual const CArgAllowCArgDesc::GetConstraint (void) const   Get argument constraint. More...
  string  CArgDesc::GetUsageConstraint (void) const   Get usage constraint. More...
  virtual const CArgErrorHandlerCArgDesc::GetErrorHandler (void) const   Get error handler for the argument. More...
  virtual void  CArgDesc::SetErrorHandler (CArgErrorHandler *)   Set error handler for the argument. More...
  CArgDescriptions::TFlags  CArgDesc::GetFlags (void) const   Get argument flags. More...
  string  CArgDesc::PrintXml (CNcbiOstream &out) const   Print description in XML format. More...
  static CRef< CArgDependencyGroupCArgDependencyGroup::Create (const string &name, const string &description=kEmptyStr)   Create new dependency group. More...
  virtual  CArgDependencyGroup::~CArgDependencyGroup (void)   CArgDependencyGroupCArgDependencyGroup::SetMinMembers (size_t min_members)   CArgDependencyGroupCArgDependencyGroup::SetMaxMembers (size_t max_members)   CArgDependencyGroupCArgDependencyGroup::Add (const string &arg_name, EInstantSet instant_set=eNoInstantSet)   Make a regular argument a member of this dependency group. More...
  CArgDependencyGroupCArgDependencyGroup::Add (CArgDependencyGroup *dep_group, EInstantSet instant_set=eNoInstantSet)   Make another dependency group a member of this dependency group. More...
  bool  CArgDependencyGroup::x_Evaluate (const CArgs &args, string *arg_set, string *arg_unset) const     CArgDependencyGroup::CArgDependencyGroup (void)     CArgDependencyGroup::CArgDependencyGroup (const CArgDependencyGroup &dep_group)   CArgDependencyGroupCArgDependencyGroup::operator= (const CArgDependencyGroup &)   void  CArgDependencyGroup::PrintUsage (list< string > &arr, size_t offset) const   void  CArgDependencyGroup::PrintUsageXml (CNcbiOstream &out) const   void  CArgDependencyGroup::Evaluate (const CArgs &args) const     CArgAllow_Regexp::CArgAllow_Regexp (const string &pattern)   virtual  CArgAllow_Regexp::~CArgAllow_Regexp (void)   virtual bool  CArgAllow_Regexp::Verify (const string &value) const   virtual string  CArgAllow_Regexp::GetUsage (void) const   Get usage information. More...
  virtual void  CArgAllow_Regexp::PrintUsageXml (CNcbiOstream &out) const   Print constraints in XML format. More...
  virtual CArgAllowCArgAllow_Regexp::Clone (void) const   Create object's clone, moving it from stack memory into heap. More...
  string  CArgValue::m_Name   Argument name. More...
  size_t  CArgValue::m_Ordinal   string  CArgValue::m_Default   TArgValueFlags  CArgValue::m_Flags   bool  CArgValue::m_Standard   TArgs  CArgs::m_Args   Assoc. map of arguments' name/value. More...
  size_t  CArgs::m_nExtra   Cached # of unnamed positional arguments. More...
  string  CArgs::m_Command   string  CArgDescriptions::SArgDependency::m_Arg   EDependency  CArgDescriptions::SArgDependency::m_Dep   EArgSetType  CArgDescriptions::m_ArgsType   Type of arguments. More...
  TArgs  CArgDescriptions::m_Args   Assoc.map of arguments' name/descr. More...
  TPosArgs  CArgDescriptions::m_PosArgs   Pos. args, ordered by position in cmd.-line. More...
  TPosArgs  CArgDescriptions::m_OpeningArgs   Opening args, ordered by position in cmd.-line. More...
  TKeyFlagArgs  CArgDescriptions::m_KeyFlagArgs   Key/flag args, in order of insertion. More...
  string  CArgDescriptions::m_NoSeparator   Arguments allowed to use no separator. More...
  unsigned  CArgDescriptions::m_nExtra   unsigned  CArgDescriptions::m_nExtraOpt   > # of mandatory extra args More...
  TArgGroups  CArgDescriptions::m_ArgGroups   Argument groups. More...
  size_t  CArgDescriptions::m_CurrentGroup   Currently selected group (0 = no group) More...
  EArgPositionalMode  CArgDescriptions::m_PositionalMode   Processing of positional args. More...
  TDependencies  CArgDescriptions::m_Dependencies   Arguments' dependencies. More...
  TMiscFlags  CArgDescriptions::m_MiscFlags   Flags for USAGE, error handling etc. More...
  set< CConstRef< CArgDependencyGroup > >  CArgDescriptions::m_DependencyGroups   string  CArgDescriptions::m_UsageName   Program name. More...
  string  CArgDescriptions::m_UsageDescription   Program description. More...
  string  CArgDescriptions::m_DetailedDescription   Program long description. More...
  SIZE_TYPE  CArgDescriptions::m_UsageWidth   Maximum length of a usage line. More...
  bool  CArgDescriptions::m_AutoHelp   Special flag "-h" activated. More...
  bool  CArgDescriptions::m_HasHidden   Has hidden arguments. More...
  CRef< CArgErrorHandlerCArgDescriptions::m_ErrorHandler   Global error handler or NULL. More...
  const CArgDescriptionsCArgDescriptions::CPrintUsage::m_desc   list< const CArgDesc * >  CArgDescriptions::CPrintUsage::m_args   const CArgDescriptionsCArgDescriptions::CPrintUsageXml::m_desc   CNcbiOstreamCArgDescriptions::CPrintUsageXml::m_out   TCommandArgFlags  CCommandArgDescriptions::m_Cmd_req   TDescriptions  CCommandArgDescriptions::m_Description   command to ArgDescriptions More...
  map< string, size_t >  CCommandArgDescriptions::m_Groups   command to group # More...
  map< string, stringCCommandArgDescriptions::m_Aliases   command to alias; one alias only More...
  list< stringCCommandArgDescriptions::m_Commands   command names, and order More...
  list< stringCCommandArgDescriptions::m_CmdGroups   group names, and order More...
  size_t  CCommandArgDescriptions::m_CurrentCmdGroup   current group # More...
  string  CCommandArgDescriptions::m_Command   current command More...
  set< TSymClassCArgAllow_Symbols::m_SymClass   TStrings  CArgAllow_Strings::m_Strings   Set of allowed string values. More...
  set< TIntervalCArgAllow_Int8s::m_MinMax   set< TIntervalCArgAllow_Doubles::m_MinMax   string  CArgDesc::m_Name   Argument name. More...
  string  CArgDesc::m_Comment   Argument description. More...
  CArgDescriptions::TFlags  CArgDesc::m_Flags   string  CArgDependencyGroup::m_Name   string  CArgDependencyGroup::m_Description   size_t  CArgDependencyGroup::m_MinMembers   size_t  CArgDependencyGroup::m_MaxMembers   map< string, EInstantSetCArgDependencyGroup::m_Arguments   map< CConstRef< CArgDependencyGroup >, EInstantSetCArgDependencyGroup::m_Groups   const string  CArgAllow_Regexp::m_Pattern   Regexp pattern to match against. More...
  CRegexp  CArgAllow_Regexp::m_Regexp   Pre-compiled regexp. More...
  ◆ TArgGroups ◆ TArgs [1/2] ◆ TArgs [2/2] ◆ TArgsCI [1/2] ◆ TArgsCI [2/2] ◆ TArgsI [1/2] ◆ TArgsI [2/2] ◆ TArgValueFlags

Bitwise OR of "EArgValueFlags".

Definition at line 330 of file ncbiargs.hpp.

◆ TCommandArgFlags ◆ TDependencies ◆ TDependency_CI ◆ TDescriptions ◆ TFileFlags ◆ TFlags ◆ THideStdArgs ◆ TInterval [1/2] ◆ TInterval [2/2] ◆ TKeyFlagArgs ◆ TMiscFlags ◆ TPosArgs ◆ TStringArray

Some values types can contain several value lists.

Example: CGIs pass list selections by repeating the same name

Definition at line 308 of file ncbiargs.hpp.

◆ TStrings

Type of the container that contains the allowed string values.

See also
m_Strings

Definition at line 1720 of file ncbiargs.hpp.

◆ TSymClass ◆ EArgPositionalMode

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 599 of file ncbiargs.hpp.

◆ EArgSetType

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 582 of file ncbiargs.hpp.

◆ EArgValueFlags

Whether the argument:

See also
GetDefault()
Enumerator fArgValue_HasDefault 

Has default value.

fArgValue_FromDefault 

Not provided in command line.

Definition at line 326 of file ncbiargs.hpp.

◆ ECommandArgFlags Enumerator eCommandMandatory 

Nonempty command is required.

eCommandOptional 

Command is not necessary.

eNoSortCommands 

On PrintUsage, keep commands unsorted.

eNoSortGroups 

On PrintUsage, keep command groups unsorted.

Definition at line 1416 of file ncbiargs.hpp.

◆ ECommandFlags Enumerator eDefault  eHidden 

Hide command in Usage.

Definition at line 1441 of file ncbiargs.hpp.

◆ EConstraintNegate

Flag to invert constraint logically.

Enumerator eConstraintInvert 

Logical NOT.

eConstraint 

Constraint is not inverted (taken as is)

Definition at line 954 of file ncbiargs.hpp.

◆ EDependency

Dependencies between arguments.

Enumerator eRequires 

One argument requires another.

eExcludes 

One argument excludes another.

Definition at line 987 of file ncbiargs.hpp.

◆ EErrCode [1/2]

Error types for improperly formatted arguments.

These error conditions are checked for and caught when processing arguments.

Enumerator eInvalidArg 

Invalid argument.

eNoValue 

Expecting an argument value.

eExcludedValue 

The value is excluded by another argument.

eWrongCast 

Incorrect cast for an argument.

eConvert 

Conversion problem.

eNoFile 

Expecting a file.

eConstraint 

Argument value outside constraints.

eArgType 

Wrong argument type.

eNoArg 

No argument.

eSynopsis 

Synopsis error.

Definition at line 126 of file ncbiargs.hpp.

◆ EErrCode [2/2]

Error type for help exception.

Enumerator eHelp 

Error code for short help message.

eHelpFull 

Error code for detailed help message.

eHelpShowAll 

Error code for detailed help message which includes hidden arguments.

eHelpXml 

Error code for XML formatted help message.

eHelpErr 

Show short help message and return error.

Definition at line 161 of file ncbiargs.hpp.

◆ EFileFlags Enumerator fBinary 

Open file in binary mode.

fText 

Open file in text mode.

fAppend 

Open file in append mode.

fTruncate 

Open file in truncate mode.

fNoCreate 

Open existing file, never create it.

fCreatePath 

If needed, create directory where the file is located.

Definition at line 262 of file ncbiargs.hpp.

◆ EFlags

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.)

Enumerator fPreOpen 

Open file right away; for eInputFile, eOutputFile, eIOFile.

fBinary 

Open as binary file; for eInputFile, eOutputFile, eIOFile.

fAppend 

Append to end-of-file; for eOutputFile or eIOFile.

fTruncate 

Delete contents of an existing file; for eOutputFile or eIOFile.

fNoCreate 

If the file does not exist, do not create it; for eOutputFile or eIOFile.

fCreatePath 

If needed, create directory where the file is located.

fFileFlags 

Mask for all file-related flags.

fAllowMultiple 

Repeated key arguments are legal (use with AddKey)

fIgnoreInvalidValue 

Ignore invalid argument values.

If not set, exceptions will be thrown on invalid values.

fWarnOnInvalidValue 

Post warning when an invalid value is ignored (no effect if fIgnoreInvalidValue is not set).

fOptionalSeparator 

Allow to ignore separator between the argument's name and value.

Usual ' ' or '=' separators can still be used with the argument. The following restrictions apply to a no-separator argument:

fOptionalSeparatorAllowConflict 

For arguments with fOptionalSeparator flag, allow other arguments which names begin with the same char.

fMandatorySeparator 

Require '=' separator.

fHidden 

Hide it in Usage.

fConfidential 

Confidential argument Such arguments can be read from command line, from file, or from console.

On command line, they can appear in one of the following forms: -key – read value from console, with automatically generated prompt -key-file fname – read value from file 'fname', if 'fname' equals '-', read value from standard input (stdin) without any prompt -key-verbatim value – read value from the command line, as is

fStandard 

Mark standard/special flag. For internal use only.

Definition at line 637 of file ncbiargs.hpp.

◆ EFlagValue ◆ EHideStdArgs

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.

Enumerator fHideLogfile 

Hide log file description.

fHideConffile 

Hide configuration file description.

fHideVersion 

Hide version description.

fHideFullVersion 

Hide full version description.

fHideDryRun 

Hide dryrun description.

fHideHelp 

Hide help description.

fHideFullHelp 

Hide full help description.

fHideXmlHelp 

Hide XML help description.

fHideAll 

Hide all standard argument descriptions.

Definition at line 1095 of file ncbiargs.hpp.

◆ EInstantSet ◆ EMiscFlags

Miscellaneous flags.

Enumerator fNoUsage 

Do not print USAGE on argument error.

fUsageIfNoArgs 

Force printing USAGE (and then exit) if no command line args are present.

fUsageSortArgs 

Sort args when printing USAGE.

fDupErrToCerr 

Print arg error to both log and cerr.

fMisc_Default 

Definition at line 1059 of file ncbiargs.hpp.

◆ EPostCheckCaller ◆ ESymbolClass

Symbol class for defining sets of characters.

Symbol character classes patterned after those defined in <ctype.h>.

Enumerator eAlnum 

Alphanumeric characters.

eAlpha 

Alphabet characters.

eCntrl 

Control characters.

eDigit 

Digit characters.

eGraph 

Graphical characters.

eLower 

Lowercase characters.

ePrint 

Printable characters.

ePunct 

Punctuation characters.

eSpace 

Space characters.

eUpper 

Uppercase characters.

eXdigit 

Hexadecimal characters.

eUser 

User defined characters using constructor with string&.

Definition at line 1572 of file ncbiargs.hpp.

◆ EType

Available argument types.

Enumerator eString 

An arbitrary string.

eBoolean 

{'true', 't', 'false', 'f'}, case-insensitive

eInt8 

Convertible into an integer number (Int8 only)

eInteger 

Convertible into an integer number (int or Int8)

eIntId 

Convertible to TIntId (int or Int8 depending on NCBI_INT8_GI)

eDouble 

Convertible into a floating point number (double)

eInputFile 

Name of file (must exist and be readable)

eOutputFile 

Name of file (must be writable)

eIOFile 

Name of file (must be writable)

eDirectory 

Name of file directory.

eDataSize 

Integer number with possible "software" qualifiers (KB, KiB, et al)

eDateTime 

DateTime string, formats: "M/D/Y h:m:s", "Y-M-DTh:m:g", "Y/M/D h:m:g", "Y-M-D h:m:g".

Time string can have trailing 'Z' symbol, specifying that it represent time in the UTC format.

k_EType_Size 

For internal use only.

Definition at line 611 of file ncbiargs.hpp.

◆ Add() [1/3]

Make another dependency group a member of this dependency group.

Attention
The "dep_group" will be added by reference, and its lifetime will be managed according to the usual CObject/CRef rules.
Parameters
instant_set "eInstantSet" means that if the added group ("dep_group") is set, then the SetMinMembers() condition doesn't apply anymore.
Returns
"*this"

Definition at line 4973 of file ncbiargs.cpp.

References CArgDependencyGroup::m_Groups.

◆ Add() [2/3]

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.

Parameters
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 1937 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().

◆ Add() [3/3]

Make a regular argument a member of this dependency group.

An argument with this name will need to be added separately using CArgDescriptions::AddXXX().

Parameters
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.
Returns
"*this"

Definition at line 4967 of file ncbiargs.cpp.

References CArgDependencyGroup::m_Arguments.

◆ AddAlias() ◆ AddCommand()

Add command argument descriptions.

Parameters
cmd Command string description Argument description alias Alternative name of the command flags Optional flags

Definition at line 4056 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().

◆ AddCommandDescription() ◆ AddDefaultFileArguments() void CArgDescriptions::AddDefaultFileArguments ( const stringdefault_config ) ◆ AddDefaultKey()

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".

Parameters
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 2467 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().

◆ AddDefaultPositional()

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:

See also
NOTE for AddPositional()
Parameters
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 2537 of file ncbiargs.cpp.

References flags, and CArgDescriptions::x_AddDesc().

◆ AddDependencyGroup()

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.

Attention
The "dep_group" will be added by reference, and its lifetime will then be managed according to the usual CObject/CRef rules.
See also
SetDependency()

Definition at line 2611 of file ncbiargs.cpp.

References set< Key, Compare >::insert(), and CArgDescriptions::m_DependencyGroups.

◆ AddDescription() void CArgDescriptions::CPrintUsage::AddDescription ( list< string > &  arr, bool  detailed  ) const ◆ AddDetails() void CArgDescriptions::CPrintUsage::AddDetails ( list< string > &  arr ) const

Definition at line 3773 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().

◆ AddExtra() void CArgDescriptions::AddExtra ( unsigned  n_mandatory, unsigned  n_optional, const stringcomment, EType  type, TFlags  flags = 0  ) ◆ AddFlag()

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.

Parameters
name Name of argument comment Argument description flags Optional flags

Definition at line 2485 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().

◆ AddKey()

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".

Parameters
name Name of argument key synopsis Synopsis for argument comment Argument description type Argument type flags Optional flags

Definition at line 2437 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().

◆ AddNegatedFlagAlias() ◆ AddOpening()

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".

Parameters
name Name of argument comment Argument description type Argument type flags Optional flags

Definition at line 2510 of file ncbiargs.cpp.

References flags, and CArgDescriptions::x_AddDesc().

Referenced by s_InitCreate(), and s_InitPost().

◆ AddOptionalKey()

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".

Parameters
name Name of argument key synopsis Synopsis for argument comment Argument description type Argument type flags Optional flags

Definition at line 2452 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().

◆ AddOptionalPositional()

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".

See also
NOTE for AddPositional()
Parameters
name Name of argument comment Argument descr. type Argument type flags Optional flags

Definition at line 2523 of file ncbiargs.cpp.

References flags, and CArgDescriptions::x_AddDesc().

Referenced by s_InitQuery(), and CPsgClientApp::s_InitRequest().

◆ AddPositional()

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".

Parameters
name Name of argument comment Argument description type Argument type flags Optional flags

Definition at line 2497 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().

◆ AddStdArguments() [1/2] void CArgDescriptions::AddStdArguments ( THideStdArgs  mask ) virtual

Add standard arguments.

Reimplemented in CCommandArgDescriptions.

Definition at line 2274 of file ncbiargs.cpp.

References CArgDescriptions::AddFlag(), CArgDescriptions::AddOptionalKey(), CArgDescriptions::Delete(), CArgDescriptions::eFlagHasValueIfSet, CArgDescriptions::eInputFile, CArgDescriptions::eOutputFile, CArgDescriptions::Exist(), CArgDescriptions::fHideConffile, CArgDescriptions::fHideDryRun, CArgDescriptions::fHideFullHelp, CArgDescriptions::fHideFullVersion, CArgDescriptions::fHideHelp, CArgDescriptions::fHideLogfile, CArgDescriptions::fHideVersion, CArgDescriptions::fHideXmlHelp, CArgDescriptions::fStandard, 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().

◆ AddStdArguments() [2/2] void CCommandArgDescriptions::AddStdArguments ( THideStdArgs  mask ) virtual ◆ AddSynopsis() ◆ Allow() [1/5] ◆ Allow() [2/5]

Add allowed string values.

Parameters
value String to add to the set of allowed string values

Definition at line 4639 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().

◆ Allow() [3/5] ◆ Allow() [4/5] ◆ Allow() [5/5] ◆ AllowRange() [1/2] ◆ AllowRange() [2/2] ◆ AllowValue() ◆ AsBoolean() virtual bool CArgValue::AsBoolean ( void  ) const 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.

See also
HasValue(), AsString(), AsInt8(), AsInteger, AsDouble()

Implemented in CArg_Boolean, CArg_String, CArg_ExcludedValue, and CArg_NoValue.

◆ AsDateTime() virtual const CTime& CArgValue::AsDateTime ( void  ) const pure virtual ◆ AsDirectory() virtual const CDir& CArgValue::AsDirectory ( void  ) const pure virtual ◆ AsDouble() virtual double CArgValue::AsDouble ( void  ) const pure virtual ◆ AsInputFile() ◆ AsInt8() virtual Int8 CArgValue::AsInt8 ( void  ) const pure virtual ◆ AsInteger() virtual int CArgValue::AsInteger ( void  ) const pure virtual ◆ AsIntId() virtual TIntId CArgValue::AsIntId ( void  ) const 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.

See also
AsInteger(), AsInt8()

Implemented in CArg_IntId, CArg_Integer, CArg_Int8, CArg_String, CArg_ExcludedValue, and CArg_NoValue.

◆ AsIOFile() ◆ AsOutputFile() ◆ Assign() ◆ AsString() virtual const string& CArgValue::AsString ( void  ) const pure virtual

Get the argument's string value.

If it is a value of a flag argument, then return either "true" or "false".

See also
AsInteger(), AsInt8(), AsDouble(), AsBoolean()

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().

◆ CArgAllow() CArgAllow::CArgAllow ( void  ) inlineprotected

Definition at line 1547 of file ncbiargs.hpp.

◆ CArgAllow_Doubles() [1/3] CArgAllow_Doubles::CArgAllow_Doubles ( double  x_min, double  x_max  ) ◆ CArgAllow_Doubles() [2/3] CArgAllow_Doubles::CArgAllow_Doubles ( double  x_value ) ◆ CArgAllow_Doubles() [3/3] CArgAllow_Doubles::CArgAllow_Doubles ( void  ) inlineprotected ◆ CArgAllow_Int8s() [1/3] CArgAllow_Int8s::CArgAllow_Int8s ( Int8  x_min, Int8  x_max  ) ◆ CArgAllow_Int8s() [2/3] CArgAllow_Int8s::CArgAllow_Int8s ( Int8  x_value ) ◆ CArgAllow_Int8s() [3/3] CArgAllow_Int8s::CArgAllow_Int8s ( void  ) inlineprotected ◆ CArgAllow_Integers() [1/3] CArgAllow_Integers::CArgAllow_Integers ( int  x_min, int  x_max  )

Constructor specifying range of allowed integer values.

Definition at line 4814 of file ncbiargs.cpp.

◆ CArgAllow_Integers() [2/3] CArgAllow_Integers::CArgAllow_Integers ( int  x_value )

Constructor specifying an allowed integer value.

Definition at line 4809 of file ncbiargs.cpp.

◆ CArgAllow_Integers() [3/3] CArgAllow_Integers::CArgAllow_Integers ( void  ) inlineprotected ◆ CArgAllow_Regexp() CArgAllow_Regexp::CArgAllow_Regexp ( const stringpattern ) ◆ CArgAllow_String() [1/3] CArgAllow_String::CArgAllow_String ( const stringsymbol_set )

Constructor for user defined eUser class.

Definition at line 4562 of file ncbiargs.cpp.

◆ CArgAllow_String() [2/3] CArgAllow_String::CArgAllow_String ( ESymbolClass  symbol_class ) ◆ CArgAllow_String() [3/3] CArgAllow_String::CArgAllow_String ( void  ) inlineprotected ◆ CArgAllow_Strings() [1/2]

Constructor.

Parameters
values Strings to add to the set of allowed string values use_case If to ignore the case of the characters

Definition at line 4633 of file ncbiargs.cpp.

◆ CArgAllow_Strings() [2/2] ◆ CArgAllow_Symbols() [1/3] CArgAllow_Symbols::CArgAllow_Symbols ( const stringsymbol_set ) ◆ CArgAllow_Symbols() [2/3] CArgAllow_Symbols::CArgAllow_Symbols ( ESymbolClass  symbol_class ) ◆ CArgAllow_Symbols() [3/3] CArgAllow_Symbols::CArgAllow_Symbols ( void  ) inlineprotected ◆ CArgDependencyGroup() [1/2] ◆ CArgDependencyGroup() [2/2] CArgDependencyGroup::CArgDependencyGroup ( void  ) private ◆ CArgDesc() ◆ CArgDescriptions()

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 2209 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().

◆ CArgs() [1/2]

Creating copy of this object usually makes no sense if it is really required, please use Assign method.

Definition at line 1780 of file ncbiargs.cpp.

References CArgs::Assign().

◆ CArgs() [2/2] ◆ CArgValue() ◆ CCommandArgDescriptions()

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 4020 of file ncbiargs.cpp.

◆ Clone() [1/8] ◆ Clone() [2/8] CArgAllow * CArgAllow_Symbols::Clone ( void  ) const protectedvirtual ◆ Clone() [3/8] CArgAllow * CArgAllow_String::Clone ( void  ) const protectedvirtual ◆ Clone() [4/8] CArgAllow * CArgAllow_Strings::Clone ( void  ) const protectedvirtual ◆ Clone() [5/8] CArgAllow * CArgAllow_Int8s::Clone ( void  ) const protectedvirtual ◆ Clone() [6/8] CArgAllow * CArgAllow_Integers::Clone ( void  ) const protectedvirtual ◆ Clone() [7/8] CArgAllow * CArgAllow_Doubles::Clone ( void  ) const protectedvirtual ◆ Clone() [8/8] CArgAllow * CArgAllow_Regexp::Clone ( void  ) const virtual ◆ CloseFile() virtual void CArgValue::CloseFile ( void  ) const pure virtual ◆ ConvertKeys()

template<class T >

void CArgDescriptions::ConvertKeys ( CArgsargs, const Targ_map, bool  update  ) const inline ◆ CPrintUsage()

Definition at line 3596 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().

◆ CPrintUsageXml() ◆ Create() ◆ CreateArgs() [1/3] ◆ CreateArgs() [2/3]

Parse command-line arguments 'argv'.

Reimplemented from CArgDescriptions.

Definition at line 4133 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().

◆ CreateArgs() [3/3]

template<class TSize , class TArray >

CArgs* CArgDescriptions::CreateArgs ( TSize  argc, TArray  argv  ) const 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

Note
Deallocate the resulting "CArgs" object using 'delete'.
Attention
This function is not suitable for parsing URL-encoded _CGI_ arg outside of the CCgiApplication framework.

Definition at line 1311 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().

◆ DECLARE_OPERATOR_BOOL() ◆ Delete()

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 2685 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().

◆ Evaluate() void CArgDependencyGroup::Evaluate ( const CArgsargs ) const ◆ Exist() [1/2]

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 1833 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().

◆ Exist() [2/2] ◆ GetAll() ◆ GetAllDescriptions() [1/2] ◆ GetAllDescriptions() [2/2] ◆ GetArgsType() ◆ GetCommand() string CArgs::GetCommand ( void  ) const inline ◆ GetComment() ◆ GetConstraint() ◆ GetDefault()

Get default value of the argument.

Parameters
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.
Returns
Default value, if specified for this argument. If the argument doesn't have a default value: empty string. If the argument is a flag: "false" or "true".

Definition at line 173 of file ncbiargs.cpp.

References CArgValue::m_Default, and CArgValue::m_Flags.

◆ GetErrCodeString() [1/2] const char * CArgException::GetErrCodeString ( void  ) const overridevirtual

Translate from the error code value to its string representation.

Reimplemented from CCoreException.

Reimplemented in CArgHelpException.

Definition at line 5167 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().

◆ GetErrCodeString() [2/2] const char * CArgHelpException::GetErrCodeString ( void  ) const overridevirtual ◆ GetErrorHandler() ◆ GetFlags()

Get argument flags.

Definition at line 1920 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(), CArgDescriptions::x_PreCheck(), and CArgDescriptions::x_PrintComment().

◆ GetGroup() virtual size_t CArgDesc::GetGroup ( void  ) const inlinevirtual ◆ GetName() [1/2]

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().

◆ GetName() [2/2]

Get argument name.

Definition at line 1869 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().

◆ GetNExtra() size_t CArgs::GetNExtra ( void  ) const inline

Get the number of unnamed positional (a.k.a. extra) args.

Definition at line 445 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().

◆ GetOrdinalPosition() size_t CArgValue::GetOrdinalPosition ( void  ) const 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 319 of file ncbiargs.hpp.

References CArgValue::m_Ordinal.

◆ GetPositionalMode() ◆ GetStringList() ◆ GetTypeName() const char * CArgDescriptions::GetTypeName ( EType  type ) static ◆ GetUsage() [1/8] string CArgAllow_Symbols::GetUsage ( void  ) const protectedvirtual ◆ GetUsage() [2/8] string CArgAllow_String::GetUsage ( void  ) const protectedvirtual ◆ GetUsage() [3/8] string CArgAllow_Strings::GetUsage ( void  ) const protectedvirtual ◆ GetUsage() [4/8] string CArgAllow_Int8s::GetUsage ( void  ) const protectedvirtual

Get usage information.

Implements CArgAllow.

Reimplemented in CArgAllow_Integers.

Definition at line 4739 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().

◆ GetUsage() [5/8] string CArgAllow_Integers::GetUsage ( void  ) const protectedvirtual

Get usage information.

Reimplemented from CArgAllow_Int8s.

Definition at line 4819 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.

◆ GetUsage() [6/8] string CArgAllow_Doubles::GetUsage ( void  ) const protectedvirtual

Get usage information.

Implements CArgAllow.

Definition at line 4874 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.

◆ GetUsage() [7/8] string CArgAllow_Regexp::GetUsage ( void  ) const virtual ◆ GetUsage() [8/8] virtual string CArgAllow::GetUsage ( void  ) const 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().

◆ GetUsageCommentAttr() virtual string CArgDesc::GetUsageCommentAttr ( void  ) const pure virtual ◆ GetUsageConstraint() string CArgDesc::GetUsageConstraint ( void  ) const ◆ GetUsageSynopsis() ◆ HandleError() ◆ HasValue() virtual bool CArgValue::HasValue ( void  ) const pure virtual ◆ IsAutoHelpEnabled() bool CArgDescriptions::IsAutoHelpEnabled ( void  ) const inline ◆ IsConstraintInverted() virtual bool CArgDesc::IsConstraintInverted ( ) const inlinevirtual ◆ IsEmpty() bool CArgs::IsEmpty ( void  ) const ◆ IsSetMiscFlag() ◆ IsStandard() size_t CArgValue::IsStandard ( void  ) const inline ◆ NCBI_EXCEPTION_DEFAULT() [1/2] ◆ NCBI_EXCEPTION_DEFAULT() [2/2] ◆ operator,() ◆ operator<() ◆ operator=() [1/2] ◆ operator=() [2/2]

Creating copy of this object usually makes no sense if it is really required, please use Assign method.

Definition at line 1785 of file ncbiargs.cpp.

References CArgs::Assign().

◆ operator[]() [1/2] ◆ operator[]() [2/2] ◆ Print()

Print (append) all arguments to the string "str" and return "str".

Definition at line 1896 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().

◆ PrintArguments()

Definition at line 3911 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().

◆ PrintUsage() [1/3] void CArgDependencyGroup::PrintUsage ( list< string > &  arr, size_t  offset  ) const

Definition at line 5055 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().

◆ PrintUsage() [2/3]

Print usage message to end of specified string.

Printout USAGE and append to the string "str" using provided argument descriptions and usage context.

Returns
Appended "str"

Reimplemented in CArgDesc_agp_validate, CDiscRepArgDescriptions, and CCommandArgDescriptions.

Definition at line 3856 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().

◆ PrintUsage() [3/3]

Print usage message to end of specified string.

Printout USAGE and append to the string "str" using provided argument descriptions and usage context.

Returns
Appended "str"

Reimplemented from CArgDescriptions.

Definition at line 4175 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().

◆ PrintUsageIfNoArgs() void CArgDescriptions::PrintUsageIfNoArgs ( bool  do_print = true ) ◆ PrintUsageXml() [1/10] void CArgDescriptions::PrintUsageXml ( CNcbiOstreamout ) const virtual ◆ PrintUsageXml() [2/10] void CCommandArgDescriptions::PrintUsageXml ( CNcbiOstreamout ) const virtual

Print argument description in XML format.

Parameters
out Print into this output stream

Reimplemented from CArgDescriptions.

Definition at line 4326 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().

◆ PrintUsageXml() [3/10] ◆ PrintUsageXml() [4/10] void CArgAllow_Symbols::PrintUsageXml ( CNcbiOstreamout ) const protectedvirtual ◆ PrintUsageXml() [5/10] void CArgAllow_String::PrintUsageXml ( CNcbiOstreamout ) const protectedvirtual ◆ PrintUsageXml() [6/10] void CArgAllow_Strings::PrintUsageXml ( CNcbiOstreamout ) const protectedvirtual ◆ PrintUsageXml() [7/10] void CArgAllow_Int8s::PrintUsageXml ( CNcbiOstreamout ) const protectedvirtual ◆ PrintUsageXml() [8/10] void CArgAllow_Doubles::PrintUsageXml ( CNcbiOstreamout ) const protectedvirtual ◆ PrintUsageXml() [9/10] void CArgDependencyGroup::PrintUsageXml ( CNcbiOstreamout ) const

Definition at line 5133 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().

◆ PrintUsageXml() [10/10] void CArgAllow_Regexp::PrintUsageXml ( CNcbiOstreamout ) const virtual ◆ PrintXml()

Print description in XML format.

Definition at line 1001 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::fStandard, 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().

◆ ProcessArgument() ◆ ProcessDefault() virtual CArgValue* CArgDesc::ProcessDefault ( void  ) const pure virtual ◆ Remove() ◆ Reset() void CArgs::Reset ( void  ) ◆ ResetMiscFlags() void CArgDescriptions::ResetMiscFlags ( TMiscFlags  flags ) inline ◆ SArgDependency() ◆ SetArgsType() [1/2] void CArgDescriptions::SetArgsType ( EArgSetType  args_type ) ◆ SetArgsType() [2/2] ◆ SetCommand() ◆ SetConstraint() [1/3] ◆ SetConstraint() [2/3] ◆ SetConstraint() [3/3]

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!

Parameters
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
See also
See "CArgAllow_***" classes for some pre-defined constraints

Definition at line 2616 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().

◆ SetCurrentCommandGroup() void CCommandArgDescriptions::SetCurrentCommandGroup ( const stringgroup ) ◆ SetCurrentGroup() void CArgDescriptions::SetCurrentGroup ( const stringgroup )

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 2657 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().

◆ SetDependency()

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 2643 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(), CFilteringArgs::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().

◆ SetDetailedDescription() void CArgDescriptions::SetDetailedDescription ( const stringusage_description )

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.

Parameters
usage_description Detailed usage description
See also
SetUsageContext

Definition at line 3374 of file ncbiargs.cpp.

References CArgDescriptions::m_DetailedDescription.

◆ SetErrorHandler() [1/2] ◆ SetErrorHandler() [2/2] ◆ SetGroup() virtual void CArgDesc::SetGroup ( size_t  ) inlinevirtual ◆ SetMaxMembers()
Parameters
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".
Returns
"*this"

Definition at line 4961 of file ncbiargs.cpp.

References CArgDependencyGroup::m_MaxMembers.

◆ SetMinMembers() ◆ SetMiscFlags() void CArgDescriptions::SetMiscFlags ( TMiscFlags  flags ) inline ◆ SetOrdinalPosition() void CArgValue::SetOrdinalPosition ( size_t  pos ) inlineprotected ◆ SetPositionalMode() ◆ SetStringList() ◆ SetUsageContext()

Set extra info to be used by PrintUsage().

If "usage_name" is empty, it will be initialized using CNcbiApplicationAPI::GetProgramDisplayName

See also
SetDetailedDescription Format width
Parameters
usage_name Program name usage_description Usage descr. usage_sort_args Sort args.

Definition at line 3344 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().

◆ ShowAllArguments() ◆ Verify() [1/7] ◆ Verify() [2/7] ◆ Verify() [3/7] ◆ Verify() [4/7] ◆ Verify() [5/7] ◆ Verify() [6/7] ◆ Verify() [7/7]

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().

◆ VerifyDefault() void CArgDesc::VerifyDefault ( void  ) const virtual ◆ VerifyName() ◆ x_AddDesc() void CArgDescriptions::x_AddDesc ( CArgDescarg ) private

Helper method for adding description.

Definition at line 3409 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().

◆ x_CheckAutoHelp() void CArgDescriptions::x_CheckAutoHelp ( const stringarg ) const protected ◆ x_CreateArg() [1/2]

Process arguments.

Helper method to process arguments and build a CArgs object that is passed as the args parameter.

Returns
TRUE if specified "arg2" was used.
Parameters
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 2898 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().

◆ x_CreateArg() [2/2]
Returns
TRUE if specified "arg2" was used.
◆ x_Evaluate()

Definition at line 4985 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().

◆ x_Find() [1/4] ◆ x_Find() [2/4] ◆ x_Find() [3/4]

Helper method to find named parameter.

'negative' (if provided) will indicate if the name referred to a negative alias.

Definition at line 2761 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().

◆ x_Find() [4/4] ◆ x_GetCommandGroupIndex() size_t CCommandArgDescriptions::x_GetCommandGroupIndex ( const stringgroup ) const private ◆ x_GetGroupIndex() size_t CArgDescriptions::x_GetGroupIndex ( const stringgroup ) const private ◆ x_IdentifyCommand()

Definition at line 4106 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().

◆ x_IsCommandMandatory() bool CCommandArgDescriptions::x_IsCommandMandatory ( void  ) const private ◆ x_IsMultiArg() ◆ x_PostCheck()

Helper method for doing post-processing consistency checks.

Definition at line 3203 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().

◆ x_PreCheck() void CArgDescriptions::x_PreCheck ( void  ) const private

Helper method for doing pre-processing consistency checks.

Definition at line 2794 of file ncbiargs.cpp.

References _ASSERT, a, set< Key, Compare >::begin(), CArgDescriptions::eConstraint, set< Key, Compare >::end(), ERR_POST_X, Error(), CArgDescriptions::fOptionalSeparator, CArgDescriptions::fOptionalSeparatorAllowConflict, CArgDescriptions::fStandard, CArgDesc::GetFlags(), CArgDesc::GetName(), i, CArgDescriptions::m_Args, CArgDescriptions::m_nExtra, CArgDescriptions::m_NoSeparator, CArgDescriptions::m_PosArgs, n, NCBI_RETHROW, NCBI_THROW, NPOS, s_IsAlias(), CArgDesc::VerifyDefault(), CException::what(), and CArgDescriptions::x_Find().

Referenced by CArgDescriptions::ConvertKeys(), and CArgDescriptions::CreateArgs().

◆ x_PrintAliasesAsXml() ◆ x_PrintComment()

Definition at line 3469 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().

◆ x_SetDefault() ◆ ~CArgAllow() CArgAllow::~CArgAllow ( void  ) virtual

Definition at line 4383 of file ncbiargs.cpp.

◆ ~CArgAllow_Regexp() CArgAllow_Regexp::~CArgAllow_Regexp ( void  ) virtual

Definition at line 54 of file arg_regexp.cpp.

◆ ~CArgDependencyGroup() CArgDependencyGroup::~CArgDependencyGroup ( void  ) virtual

Definition at line 4951 of file ncbiargs.cpp.

◆ ~CArgDesc() CArgDesc::~CArgDesc ( void  ) virtual ◆ ~CArgDescriptions() CArgDescriptions::~CArgDescriptions ( void  ) virtual ◆ ~CArgs() ◆ ~CArgValue() CArgValue::~CArgValue ( void  ) protectedvirtual

Definition at line 161 of file ncbiargs.cpp.

◆ ~CCommandArgDescriptions() CCommandArgDescriptions::~CCommandArgDescriptions ( void  ) virtual ◆ ~CPrintUsage() CArgDescriptions::CPrintUsage::~CPrintUsage ( )

Definition at line 3697 of file ncbiargs.cpp.

◆ ~CPrintUsageXml() CArgDescriptions::CPrintUsageXml::~CPrintUsageXml ( )

Definition at line 3906 of file ncbiargs.cpp.

◆ m_Aliases ◆ m_Arg ◆ m_ArgGroups ◆ m_Args [1/2] ◆ m_Args [2/2] TArgs CArgDescriptions::m_Args private

Assoc.map of arguments' name/descr.

Definition at line 1166 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().

◆ m_args ◆ m_ArgsType ◆ m_Arguments ◆ m_AutoHelp bool CArgDescriptions::m_AutoHelp protected ◆ m_Cmd_req ◆ m_CmdGroups list<string> CCommandArgDescriptions::m_CmdGroups private ◆ m_Command [1/2] ◆ m_Command [2/2] string CCommandArgDescriptions::m_Command mutableprivate ◆ m_Commands list<string> CCommandArgDescriptions::m_Commands private ◆ m_Comment ◆ m_CurrentCmdGroup size_t CCommandArgDescriptions::m_CurrentCmdGroup private ◆ m_CurrentGroup size_t CArgDescriptions::m_CurrentGroup private ◆ m_Default ◆ m_Dep ◆ m_Dependencies ◆ m_DependencyGroups ◆ m_desc [1/2] ◆ m_desc [2/2] ◆ m_Description [1/2] ◆ m_Description [2/2] string CArgDependencyGroup::m_Description private ◆ m_DetailedDescription string CArgDescriptions::m_DetailedDescription protected ◆ m_ErrorHandler ◆ m_Flags [1/2] ◆ m_Flags [2/2] ◆ m_Groups [1/2] map<string, size_t > CCommandArgDescriptions::m_Groups private ◆ m_Groups [2/2] ◆ m_HasHidden bool CArgDescriptions::m_HasHidden protected ◆ m_KeyFlagArgs ◆ m_MaxMembers size_t CArgDependencyGroup::m_MaxMembers private ◆ m_MinMax [1/2] ◆ m_MinMax [2/2] ◆ m_MinMembers size_t CArgDependencyGroup::m_MinMembers private ◆ m_MiscFlags ◆ m_Name [1/3] ◆ m_Name [2/3] ◆ m_Name [3/3] string CArgDependencyGroup::m_Name private ◆ m_nExtra [1/2] ◆ m_nExtra [2/2] unsigned CArgDescriptions::m_nExtra private ◆ m_nExtraOpt unsigned CArgDescriptions::m_nExtraOpt private ◆ m_NoSeparator string CArgDescriptions::m_NoSeparator private ◆ m_OpeningArgs TPosArgs CArgDescriptions::m_OpeningArgs private ◆ m_Ordinal size_t CArgValue::m_Ordinal protected ◆ m_out ◆ m_Pattern ◆ m_PosArgs ◆ m_PositionalMode ◆ m_Regexp ◆ m_Standard bool CArgValue::m_Standard protected ◆ m_Strings ◆ m_SymClass ◆ m_UsageDescription string CArgDescriptions::m_UsageDescription protected ◆ m_UsageName string CArgDescriptions::m_UsageName protected ◆ m_UsageWidth ◆ CArgDesc_Flag ◆ CArgDescDefault ◆ CArgDescMandatory ◆ CArgs ◆ CCommandArgDescriptions [1/2] ◆ CCommandArgDescriptions [2/2]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4