OpenRTM  1.0.0
Public Member Functions | Public Attributes | List of all members
coil::GetOpt Class Reference

GetOpt class. More...

#include <OS.h>

Public Member Functions

 GetOpt (int argc, char *const argv[], const char *opt, int flag)
 Constructor.
 ~GetOpt ()
 Destructor.
int operator() ()
 Parses the command line arguments.

Public Attributes

char * optarg
int optind
 オプション引数
int opterr
 処理対象引数
int optopt
 エラー表示 0:抑止、1:表示

Detailed Description

GetOpt class.

Constructor & Destructor Documentation

coil::GetOpt::GetOpt ( int  argc,
char *const  argv[],
const char *  opt,
int  flag 
)
inline

Constructor.

Constructor

Parameters
nameObject name

References optind.

coil::GetOpt::~GetOpt ( )
inline

Destructor.

Destructor

References optind.

Member Function Documentation

int coil::GetOpt::operator() ( )
inline

Parses the command line arguments.

Parses the command line arguments.

Returns
Result of parses.

References optarg, opterr, optind, and optopt.

Member Data Documentation

char* coil::GetOpt::optarg

Referenced by operator()().

int coil::GetOpt::opterr

処理対象引数

Referenced by operator()().

int coil::GetOpt::optind

オプション引数

Referenced by GetOpt(), operator()(), and ~GetOpt().

int coil::GetOpt::optopt

エラー表示 0:抑止、1:表示

Referenced by operator()().