TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PagerArgs Class Reference

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

#include <tsPagerArgs.h>

Public Member Functions

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

Public Attributes

bool page_by_default = false
 Use a page process by default.
 
bool use_pager = false
 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()

void ts::PagerArgs::defineArgs ( Args args)

Add command line option definitions in an Args.

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

◆ loadArgs()

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

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.

◆ 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: