openMSX
Classes | Public Types | Public Member Functions | List of all members
openmsx::CommandLineParser Class Reference

#include <CommandLineParser.hh>

Inheritance diagram for openmsx::CommandLineParser:
Inheritance graph
[legend]
Collaboration diagram for openmsx::CommandLineParser:
Collaboration graph
[legend]

Public Types

enum  ParseStatus {
  UNPARSED, RUN, CONTROL, TEST,
  EXIT
}
 
enum  ParsePhase {
  PHASE_BEFORE_INIT, PHASE_INIT, PHASE_BEFORE_SETTINGS, PHASE_LOAD_SETTINGS,
  PHASE_BEFORE_MACHINE, PHASE_LOAD_MACHINE, PHASE_LAST
}
 
using Scripts = std::vector< std::string >
 

Public Member Functions

 CommandLineParser (Reactor &reactor)
 
 ~CommandLineParser ()
 
void registerOption (const char *str, CLIOption &cliOption, ParsePhase phase=PHASE_LAST, unsigned length=2)
 
void registerFileType (string_ref extensions, CLIFileType &cliFileType)
 
void parse (int argc, char **argv)
 
ParseStatus getParseStatus () const
 
const ScriptsgetStartupScripts () const
 
MSXMotherBoardgetMotherBoard () const
 
GlobalCommandControllergetGlobalCommandController () const
 
InterpretergetInterpreter () const
 
bool isHiddenStartup () const
 Need to suppress renderer window on startup? More...
 

Detailed Description

Definition at line 32 of file CommandLineParser.hh.

Member Typedef Documentation

using openmsx::CommandLineParser::Scripts = std::vector<std::string>

Definition at line 54 of file CommandLineParser.hh.

Member Enumeration Documentation

Enumerator
PHASE_BEFORE_INIT 
PHASE_INIT 
PHASE_BEFORE_SETTINGS 
PHASE_LOAD_SETTINGS 
PHASE_BEFORE_MACHINE 
PHASE_LOAD_MACHINE 
PHASE_LAST 

Definition at line 36 of file CommandLineParser.hh.

Enumerator
UNPARSED 
RUN 
CONTROL 
TEST 
EXIT 

Definition at line 35 of file CommandLineParser.hh.

Constructor & Destructor Documentation

openmsx::CommandLineParser::CommandLineParser ( Reactor reactor)
explicit
openmsx::CommandLineParser::~CommandLineParser ( )

Definition at line 82 of file CommandLineParser.cc.

Member Function Documentation

GlobalCommandController & openmsx::CommandLineParser::getGlobalCommandController ( ) const
Interpreter & openmsx::CommandLineParser::getInterpreter ( ) const
MSXMotherBoard * openmsx::CommandLineParser::getMotherBoard ( ) const
CommandLineParser::ParseStatus openmsx::CommandLineParser::getParseStatus ( ) const

Definition at line 282 of file CommandLineParser.cc.

References UNPARSED.

Referenced by openmsx::Reactor::run().

const CommandLineParser::Scripts & openmsx::CommandLineParser::getStartupScripts ( ) const

Definition at line 288 of file CommandLineParser.cc.

Referenced by openmsx::Reactor::run().

bool openmsx::CommandLineParser::isHiddenStartup ( ) const

Need to suppress renderer window on startup?

Definition at line 277 of file CommandLineParser.cc.

References CONTROL, and TEST.

void openmsx::CommandLineParser::parse ( int  argc,
char **  argv 
)
void openmsx::CommandLineParser::registerFileType ( string_ref  extensions,
CLIFileType cliFileType 
)
void openmsx::CommandLineParser::registerOption ( const char *  str,
CLIOption cliOption,
ParsePhase  phase = PHASE_LAST,
unsigned  length = 2 
)

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