Developer documentation
Version 3.0.3-105-gd3941f44
MR::App::OptionGroup Class Reference

a class to hold a named list of Option's More...

#include "cmdline_option.h"

Inheritance diagram for MR::App::OptionGroup:
MR::vector< Option >

Public Member Functions

 OptionGroup (const char *group_name="OPTIONS")
 
OptionGroupoperator+ (const Option &option)
 
OptionGroupoperator+ (const Argument &argument)
 
Optionback ()
 
std::string header (int format) const
 
std::string contents (int format) const
 
- Public Member Functions inherited from MR::vector< Option >
 vector ()
 

Static Public Member Functions

static std::string footer (int format)
 

Public Attributes

const char * name
 

Detailed Description

a class to hold a named list of Option's

the name is used as the section heading for the options that follow. For example:

void usage () {
...
+ Option (...)
+ OptionGroup ("Special options")
+ Option ("option1", ...)
+ Option ("option2", ...);
}
void usage()
OptionGroup(const char *group_name="OPTIONS")
OptionList OPTIONS
the options accepted by the command

Definition at line 418 of file cmdline_option.h.

Constructor & Destructor Documentation

◆ OptionGroup()

MR::App::OptionGroup::OptionGroup ( const char *  group_name = "OPTIONS")
inline

Definition at line 420 of file cmdline_option.h.

Member Function Documentation

◆ back()

Option & MR::App::OptionGroup::back ( )
inline

Definition at line 434 of file cmdline_option.h.

◆ contents()

std::string MR::App::OptionGroup::contents ( int  format) const

◆ footer()

static std::string MR::App::OptionGroup::footer ( int  format)
static

◆ header()

std::string MR::App::OptionGroup::header ( int  format) const

◆ operator+() [1/2]

OptionGroup & MR::App::OptionGroup::operator+ ( const Argument argument)
inline

Definition at line 428 of file cmdline_option.h.

◆ operator+() [2/2]

OptionGroup & MR::App::OptionGroup::operator+ ( const Option option)
inline

Definition at line 423 of file cmdline_option.h.

Member Data Documentation

◆ name

const char* MR::App::OptionGroup::name

Definition at line 421 of file cmdline_option.h.


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