apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

CommandLine Class Reference

#include <cmndline.h>

Collaboration diagram for CommandLine:


struct  Args
struct  Dispatch

Public Types

enum  AFlags {
  HasArg = (1 << 0) , IntLevel = (1 << 1) , Boolean = (1 << 2) , InvBoolean = (1 << 3) ,
  ConfigFile = (1 << 4) | HasArg , ArbItem = (1 << 5) | HasArg

Public Member Functions

bool Parse (int argc, const char **argv)
void ShowHelp ()
unsigned int FileSize () const APT_PURE
bool DispatchArg (Dispatch const *const List, bool NoMatch=true)
 CommandLine ()
 CommandLine (Args *AList, Configuration *Conf)
 ~CommandLine ()

Static Public Member Functions

static char const * GetCommand (Dispatch const *const Map, unsigned int const argc, char const *const *const argv) APT_PURE
static CommandLine::Args MakeArgs (char ShortOpt, char const *LongOpt, char const *ConfName, unsigned long Flags) APT_PURE

Public Attributes

const char ** FileList

Protected Member Functions

bool HandleOpt (int &I, int argc, const char *argv[], const char *&Opt, Args *A, bool PreceedeMatch=false)

Static Protected Member Functions

static void SaveInConfig (unsigned int const &argc, char const *const *const argv)

Protected Attributes


Detailed Description

Definition at line 51 of file cmndline.h.

Member Enumeration Documentation

◆ AFlags

enum AFlags

Definition at line 68 of file cmndline.h.

Constructor & Destructor Documentation

◆ CommandLine() [1/2]

Definition at line 36 of file cmndline.cc.

◆ CommandLine() [2/2]

CommandLine ( Args AList,
Configuration Conf 

Definition at line 32 of file cmndline.cc.

◆ ~CommandLine()

Definition at line 43 of file cmndline.cc.

References FileList.

Member Function Documentation

◆ DispatchArg()

bool DispatchArg ( Dispatch const *const  List,
bool  NoMatch = true 

Definition at line 362 of file cmndline.cc.

References FileList, CommandLine::Dispatch::Handler, I, and CommandLine::Dispatch::Match.

Referenced by DispatchCommandLine().

◆ FileSize()

◆ GetCommand()

char const * GetCommand ( Dispatch const *const  Map,
unsigned int const  argc,
char const *const *const  argv 

Definition at line 49 of file cmndline.cc.

References CommandLine::Dispatch::Match.

◆ HandleOpt()

bool HandleOpt ( int &  I,
int  argc,
const char *  argv[],
const char *&  Opt,
Args A,
bool  PreceedeMatch = false 

◆ MakeArgs()

CommandLine::Args MakeArgs ( char  ShortOpt,
char const *  LongOpt,
char const *  ConfName,
unsigned long  Flags 

◆ Parse()

◆ SaveInConfig()

void SaveInConfig ( unsigned int const &  argc,
char const *const *const  argv 

Definition at line 391 of file cmndline.cc.

References _config.

Referenced by Parse().

◆ ShowHelp()

void ShowHelp ( )

Member Data Documentation

◆ ArgList

Args* ArgList

Definition at line 60 of file cmndline.h.

Referenced by Parse().

◆ Conf

Configuration* Conf

Definition at line 61 of file cmndline.h.

Referenced by HandleOpt().

◆ FileList

The documentation for this class was generated from the following files: