libdballe 9.6
Public Member Functions | Public Attributes | List of all members
dballe::cmdline::Subcommand Struct Referenceabstract

Public Member Functions

virtual void add_to_optable (std::vector< poptOption > &opts) const
 
virtual void init ()
 Optional initialization before main is called.
 
virtual int main (poptContext)=0
 
poptContext make_popt_context (int argc, const char *argv[], std::vector< poptOption > &opts) const
 Create a popt context for this subcommand.
 
void manpage_print_options (FILE *out)
 

Public Attributes

std::vector< std::string > names
 
std::string usage
 
std::string desc
 
std::string longdesc
 
int op_verbose
 

Member Function Documentation

◆ make_popt_context()

poptContext dballe::cmdline::Subcommand::make_popt_context ( int  argc,
const char *  argv[],
std::vector< poptOption > &  opts 
) const

Create a popt context for this subcommand.

Options are appended to opts, which is generally passed empty. Its memory needs to be owned by the caller, because the resulting poptContext will refer to data inside it, so the lifetime of the vector should be at least as long as the lifetime of the resulting poptContext.


The documentation for this struct was generated from the following file: