openMSX
Classes | Public Types | Public Member Functions | Friends | 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
}
 
typedef std::vector< std::string > Scripts
 

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...
 

Friends

class ControlOption
 
class HelpOption
 
class VersionOption
 
class MachineOption
 
class SettingOption
 
class TestConfigOption
 
class BashOption
 

Detailed Description

Definition at line 40 of file CommandLineParser.hh.

Member Typedef Documentation

typedef std::vector<std::string> openmsx::CommandLineParser::Scripts

Definition at line 62 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 44 of file CommandLineParser.hh.

Enumerator
UNPARSED 
RUN 
CONTROL 
TEST 
EXIT 

Definition at line 43 of file CommandLineParser.hh.

Constructor & Destructor Documentation

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

Definition at line 196 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 396 of file CommandLineParser.cc.

References UNPARSED.

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

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

Definition at line 402 of file CommandLineParser.cc.

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

bool openmsx::CommandLineParser::isHiddenStartup ( ) const

Need to suppress renderer window on startup?

Definition at line 391 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 
)

Friends And Related Function Documentation

friend class BashOption
friend

Definition at line 124 of file CommandLineParser.hh.

friend class ControlOption
friend

Definition at line 118 of file CommandLineParser.hh.

friend class HelpOption
friend

Definition at line 119 of file CommandLineParser.hh.

friend class MachineOption
friend

Definition at line 121 of file CommandLineParser.hh.

friend class SettingOption
friend

Definition at line 122 of file CommandLineParser.hh.

friend class TestConfigOption
friend

Definition at line 123 of file CommandLineParser.hh.

friend class VersionOption
friend

Definition at line 120 of file CommandLineParser.hh.


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