MP4v2

Public Types | Public Attributes | List of all members
mp4v2::platform::prog::Option Struct Reference

Structure describing a single option. More...

`#include <option.h>`

## Public Types
enum | Type { NO_ARG , REQUIRED_ARG , OPTIONAL_ARG }
| expectation-type indicating number of arguments expected on the command-line following the option-argument itself More...

## Public Attributes
const char * | name
| contains the option name without leading double-dash
Type | type
| option expectation-type
int * | flag
| If not NULL, then the integer pointed to by it will be set to the value in the val field. More...
int | val
| Constant value representing option. More...

## Detailed Description

Structure describing a single option.

An instance of Option is required for each program option and is initialized before use with getOption() or getOptionWord().

## Member Enumeration Documentation

## ◆ Type

enum mp4v2::platform::prog::Option::Type

expectation-type indicating number of arguments expected on the command-line following the option-argument itself

Enumerator
NO_ARG | indicates exactly 0 arguments follow option
REQUIRED_ARG | indicates exactly 1 argument follow option
OPTIONAL_ARG | indicates 0 or 1 arguments follow option

## Member Data Documentation

## ◆ flag

int* mp4v2::platform::prog::Option::flag

If not NULL, then the integer pointed to by it will be set to the value in the val field.

If the flag field is NULL, then the val field will be returned.

## ◆ val

int mp4v2::platform::prog::Option::val

Constant value representing option.

This is usually a single-char ASCII value but in case of long-options without a corresponding single-char value it can be a unique integer (beyond ASCII range) which represents the long-option.