Ookii.CommandLine for C++  1.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ookii::shell_command_info< CharType, Traits, Alloc > Class Template Reference

Provides information about a shell command. More...

#include <ookii/shell_command.h>

Public Types

using builder_type = typename command_type::builder_type
 The concrete type of basic_parser_builder used.
 
using command_type = basic_shell_command< CharType, Traits, Alloc >
 The concrete type of basic_shell_command used.
 
using string_type = std::basic_string< CharType, Traits, Alloc >
 The concrete string type used.
 

Public Member Functions

std::unique_ptr< command_typecreate (builder_type &builder) const
 Creates an instance of the shell command type. More...
 
const string_typedescription () const noexcept
 Gets the description of the shell command.
 
const string_typename () const noexcept
 Gets the name of the shell command.
 

Static Public Member Functions

template<typename T >
static shell_command_info create (string_type name, string_type description)
 Creates a shell_command_info instance for the specified type. More...
 

Detailed Description

template<typename CharType, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
class ookii::shell_command_info< CharType, Traits, Alloc >

Provides information about a shell command.

Template Parameters
CharTypeThe character type used for arguments and other strings.
TraitsThe character traits to use for strings. Defaults to std::char_traits<CharType>.
AllocThe allocator to use for strings. Defaults to std::allocator<CharType>.

Member Function Documentation

◆ create() [1/2]

template<typename CharType , typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
std::unique_ptr<command_type> ookii::shell_command_info< CharType, Traits, Alloc >::create ( builder_type builder) const
inline

Creates an instance of the shell command type.

Parameters
builderThe basic_parser_builder to pass to the shell command type's constructor.

◆ create() [2/2]

template<typename CharType , typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
template<typename T >
static shell_command_info ookii::shell_command_info< CharType, Traits, Alloc >::create ( string_type  name,
string_type  description 
)
inlinestatic

Creates a shell_command_info instance for the specified type.

Template Parameters
TThe type of the shell command, which must derive from basic_shell_command.
Parameters
nameThe name of the shell command.
descriptionThe description of the shell command.

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