---
name: "ost_CommandOptionRest"
section: "3"
platform: "linux"
package: "libcommoncpp2-doc"
version: "1.8.1-10"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ost_CommandOptionRest"
---

# ost\_CommandOptionRest(3)

It only makes sense to have a single one of these set and it is exclusive with CommandOptionCollect.

## NAME

ost::CommandOptionRest - It only makes sense to have a single one of these set and it is exclusive with **CommandOptionCollect**.

## SYNOPSIS

`#include <cmdoptns.h>`

Inherits **ost::CommandOptionWithArg**.

### Public Member Functions

**CommandOptionRest** (const char \*inOptionName, const char \*inOptionLetter, const char \*inDescription, bool inRequired=false, **CommandOption** \*\*ppNext=&**defaultCommandOptionList**)\
 **CommandOptionRest** contructor.

### Additional Inherited Members

## Detailed Description

It only makes sense to have a single one of these set and it is exclusive with **CommandOptionCollect**.

It is the option that takes the rest of the command line options that are not part of any other options. e.g. 'strace -ofile command arg1 arg2'. The 'command arg1 arg2' part is placed in objects of this class.

**CommandOption** to take the rest of the command line

**Examples** **cmdlineopt.cpp**.

## Constructor & Destructor Documentation

### ost::CommandOptionRest::CommandOptionRest (const char \* inOptionName, const char \* inOptionLetter, const char \* inDescription, bool inRequired = `false`, CommandOption \*\* ppNext = `&`defaultCommandOptionList)

**CommandOptionRest** contructor. This sets the optionType for this object to Trailing.

**Parameters**

*inOptionName* long option name \
 *inOptionLetter* short letter name \
 *inDescription* short description of the option \
 *inRequired* true if option is required \
 *ppNext* the linked list header

## Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.
