mjplusplus  v0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
option::Parser::StoreOptionAction Class Reference

#include <optionparser.h>

Inheritance diagram for option::Parser::StoreOptionAction:
option::Parser::Action

Public Member Functions

 StoreOptionAction (Parser &parser_, Option options_[], Option buffer_[], int bufmax_)
 Number of slots in buffer. -1 means "large enough". More...
 
bool perform (Option &option)
 Called by Parser::workhorse() for each Option that has been successfully parsed (including unknown options if they have a Descriptor whose Descriptor::check_arg does not return ARG_ILLEGAL. More...
 
bool finished (int numargs, const char **args)
 Called by Parser::workhorse() after finishing the parse. More...
 

Constructor & Destructor Documentation

option::Parser::StoreOptionAction::StoreOptionAction ( Parser parser_,
Option  options_[],
Option  buffer_[],
int  bufmax_ 
)
inline

Number of slots in buffer. -1 means "large enough".

Creates a new StoreOption action.

Parameters
parser_the parser whose op_count should be updated.
options_each Option o is chained into the linked list options_[o.desc->index]
buffer_each Option is appended to this array as long as there's a free slot.
bufmax_number of slots in buffer_. -1 means "large enough".

Member Function Documentation

bool option::Parser::StoreOptionAction::finished ( int  numargs,
const char **  args 
)
inlinevirtual

Called by Parser::workhorse() after finishing the parse.

Parameters
numargsthe number of non-option arguments remaining
argspointer to the first remaining non-option argument (if numargs > 0).
Returns
false iff a fatal error has occurred.

Reimplemented from option::Parser::Action.

bool option::Parser::StoreOptionAction::perform ( Option )
inlinevirtual

Called by Parser::workhorse() for each Option that has been successfully parsed (including unknown options if they have a Descriptor whose Descriptor::check_arg does not return ARG_ILLEGAL.

Returns false iff a fatal error has occured and the parse should be aborted.

Reimplemented from option::Parser::Action.


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