TSDuck Version 3.21-1704 (TSDuck - The MPEG Transport Stream Toolkit)
ts::PagerArgs Class Reference

Command line arguments for --pager or --no-pager. More...

Inheritance diagram for ts::PagerArgs:
Collaboration diagram for ts::PagerArgs:

Public Member Functions

 PagerArgs (bool pageByDefault=false, bool stdoutOnly=true)
 Default constructor. More...
 
virtual ~PagerArgs ()
 Virtual destructor.
 
virtual void defineArgs (Args &args) const override
 Add command line option definitions in an Args. More...
 
virtual bool loadArgs (DuckContext &duck, Args &args) override
 Load arguments from command line. More...
 
std::ostream & output (Report &report=(*ts::CerrReport::Instance()))
 Return the output device for display. More...
 

Public Attributes

bool page_by_default
 Use a page process by default.
 
bool use_pager
 Actually use a page process.
 

Detailed Description

Command line arguments for --pager or --no-pager.

Constructor & Destructor Documentation

◆ PagerArgs()

ts::PagerArgs::PagerArgs ( bool  pageByDefault = false,
bool  stdoutOnly = true 
)

Default constructor.

Parameters
[in]pageByDefaultIf true, paging is enabled by default and option --no-pager is defined. If false, do not page by default and option --pager is defined.
[in]stdoutOnlyIf true, use only stdout. If false, if stdout is not a terminal but stderr is one, then use stderr for paging.

Member Function Documentation

◆ defineArgs()

virtual void ts::PagerArgs::defineArgs ( Args args) const
overridevirtual

Add command line option definitions in an Args.

Parameters
[in,out]argsCommand line arguments to update.

Implements ts::ArgsSupplierInterface.

◆ loadArgs()

virtual bool ts::PagerArgs::loadArgs ( DuckContext duck,
Args args 
)
overridevirtual

Load arguments from command line.

Args error indicator is set in case of incorrect arguments.

Parameters
[in,out]duckTSDuck execution context.
[in,out]argsCommand line arguments.
Returns
True on success, false on error in argument line.

Implements ts::ArgsSupplierInterface.

◆ output()

std::ostream& ts::PagerArgs::output ( Report report = (*ts::CerrReport::Instance()))

Return the output device for display.

Parameters
[in,out]reportWhere to report errors.
Returns
A reference to the output device, either std::cout or a pager stream.

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