Panda3D
Classes | Public Member Functions | List of all members
PandaGetopt Class Reference

The implementation within this file of the various getopt() functions. More...

Public Member Functions

 PandaGetopt (int argc, char *const argv[], const char *optstring, const struct option *longopts, bool allow_one_hyphen_long)
 
void permute (int argc, char **mutable_argv)
 Permutes the argv array so that the non-option arguments are at the end of the list (if POSIXLY_CORRECT is not set), as the gnu implementation does. More...
 
int process (int panda_opterr, int *longindex, char *&panda_optarg, int &panda_optind, int &panda_optopt)
 Can be called repeatedly to extract out the option arguments scanned from the argv list, one at a time. More...
 

Detailed Description

The implementation within this file of the various getopt() functions.

This class is not visible outside of this file; instead, the interface is via the getopt() functions themselves.

Definition at line 40 of file panda_getopt_impl.cxx.

Member Function Documentation

◆ permute()

void PandaGetopt::permute ( int  argc,
char **  mutable_argv 
)

Permutes the argv array so that the non-option arguments are at the end of the list (if POSIXLY_CORRECT is not set), as the gnu implementation does.

Definition at line 193 of file panda_getopt_impl.cxx.

References process().

Referenced by process().

◆ process()

int PandaGetopt::process ( int  panda_opterr,
int *  longindex,
char *&  panda_optarg,
int &  panda_optind,
int &  panda_optopt 
)

Can be called repeatedly to extract out the option arguments scanned from the argv list, one at a time.

Sets *longindex, optarg, optind, optopt. Returns EOF when finished.

Definition at line 222 of file panda_getopt_impl.cxx.

References permute(), and process().

Referenced by permute(), and process().


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