Argus Camera Sample Argus Camera Sample

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes
ArgusSamples::Options::Option Class Reference

Defines a single option. More...

`#include <Options.h>`

List of all members.

## Public Types

enum | Type { TYPE_ACTION, TYPE_OPTION }
| Type. More...
enum | Flag { FLAG_NO_ARGUMENT, FLAG_OPTIONAL_ARGUMENT, FLAG_REQUIRED_ARGUMENT }
| Argument flags. More...
typedef bool(* | CallBackFunc )(void *usrPtr, const char *optArg)
| Call back function.

## Public Member Functions

| Option (std::string name, char shortName, std::string argument, Type type, Flag flags, std::string usage, CallBackFunc function, void *userPtr=NULL)
| Construct an option.
template<typename T >
| Option (std::string name, char shortName, std::string argument, Value< T > &value, std::string usage, CallBackFunc function, void *userPtr=NULL)
| Construct an option from a Value.
| ~Option ()

## Public Attributes

std::string | m_name
| option name
char | m_shortName
| option short name
std::string | m_argument
| argument name
Type | m_type
| option type
Flag | m_flags
| option flags
std::string | m_usage
| usage message
CallBackFunc | m_function
| callback function
void * | m_userPtr
| user pointer passed to callback function

## Detailed Description

Defines a single option.

Definition at line 54 of file Options.h.

## Member Typedef Documentation

typedef bool(* ArgusSamples::Options::Option::CallBackFunc)(void *usrPtr, const char *optArg)

Call back function.

Parameters:

  [in] | usrPtr | user pointer
  [in] | optArg | optional argument string, NULL when there is no argument

Definition at line 82 of file Options.h.

## Member Enumeration Documentation

enum ArgusSamples::Options::Option::Flag

Argument flags.

Enumerator:

  FLAG_NO_ARGUMENT | requires no argument
  FLAG_OPTIONAL_ARGUMENT | optionally takes an argument
  FLAG_REQUIRED_ARGUMENT | requires an argument

Definition at line 69 of file Options.h.

enum ArgusSamples::Options::Option::Type

Type.

Enumerator:

  TYPE_ACTION | triggers an action
  TYPE_OPTION | sets an option

Definition at line 60 of file Options.h.

## Constructor & Destructor Documentation

ArgusSamples::Options::Option::Option | ( | std::string | name,
|  | char | shortName,
|  | std::string | argument,
|  | Type | type,
|  | Flag | flags,
|  | std::string | usage,
|  | CallBackFunc | function,
|  | void * | userPtr = `NULL`
| ) |  |

inlineexplicit

Construct an option.

Parameters:

  name | [in] long option name
  shortName | [in] short option name
  argument | [in] argument
  type | [in] option type
  flags | [in] flags
  usage | [in] a string describing the usage
  function | [in] callback function
  userPtr | [in] user pointer

Definition at line 96 of file Options.h.

template<typename T >

ArgusSamples::Options::Option::Option | ( | std::string | name,
|  | char | shortName,
|  | std::string | argument,
|  | Value< T > & | value,
|  | std::string | usage,
|  | CallBackFunc | function,
|  | void * | userPtr = `NULL`
| ) |  |

inlineexplicit

Construct an option from a Value.

The final usage string is build from the given usage and the default and valid values of the given value variable.

Parameters:

  name | [in] long option name
  shortName | [in] short option name
  argument | [in] argument
  value | [in] value to construct the option from
  usage | [in] a string describing the usage
  function | [in] callback function
  userPtr | [in] user pointer

Definition at line 120 of file Options.h.

ArgusSamples::Options::Option::~Option | ( |  | ) |

inline

Definition at line 136 of file Options.h.

## Member Data Documentation

std::string ArgusSamples::Options::Option::m_argument

argument name

Definition at line 142 of file Options.h.

Flag ArgusSamples::Options::Option::m_flags

option flags

Definition at line 144 of file Options.h.

CallBackFunc ArgusSamples::Options::Option::m_function

callback function

Definition at line 146 of file Options.h.

std::string ArgusSamples::Options::Option::m_name

option name

Definition at line 140 of file Options.h.

char ArgusSamples::Options::Option::m_shortName

option short name

Definition at line 141 of file Options.h.

Type ArgusSamples::Options::Option::m_type

option type

Definition at line 143 of file Options.h.

std::string ArgusSamples::Options::Option::m_usage

usage message

Definition at line 145 of file Options.h.

void* ArgusSamples::Options::Option::m_userPtr

user pointer passed to callback function

Definition at line 147 of file Options.h.

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

- ui/common/Options.h