COPASI API  4.40.278
copasi::COptionParser Class Reference

#include <COptionParser.h>

Public Member Functions

 COptionParser (void)
 default constructor More...
 
void finalize (void)
 finalize all parsing (eg. check for mandatory options) More...
 
const option_locationsget_locations (void) const
 get the main option locations More...
 
const std::vector< std::string > & get_non_options (void) const
 get a list of nonoptions from the command line More...
 
const optionsget_options (void) const
 get the main options More...
 
void parse (const char *fileName)
 parse a file More...
 
void parse (int argc, char *argv[], bool call_finalize=true)
 parse the command line More...
 

Private Types

enum  opsource { source_cl , source_cf }
 
enum  options_enum {
  option_ConfigDir , option_ConfigFile , option_CopasiDir , option_Home ,
  option_Tmp , option_Verbose , option_NoLogo , option_License ,
  option_Validate , option_Save , option_ImportSBML , option_ExportSBML ,
  option_SBMLSchema , option_ImportCombineArchive , option_ExportCombineArchive , option_ImportSEDML ,
  option_ExportSEDML , option_ExportBerkeleyMadonna , option_ExportC , option_ExportXPPAUT ,
  option_MaxTime , option_ConvertToIrreversible , option_ReportFile , option_ScheduledTask ,
  option_ReparameterizeModel , option_ExportIni , option_SedmlTask , option_PrintSedMLTasks
}
 
enum  parser_state { state_option , state_value , state_consume }
 

Private Member Functions

void parse_element (const char *element, int position, opsource source)
 
void parse_long_option (const char *option, int position, opsource source)
 
void parse_short_option (char option, int position, opsource source)
 
void parse_value (const char *value)
 

Private Attributes

option_locations locations_
 
std::vector< std::string > non_options_
 
enum copasi::COptionParser::options_enum openum_
 
options options_
 
enum copasi::COptionParser::parser_state state_
 

Detailed Description

the COptionParser class is the main command line parsing class. You can control the name of it using the cxx_class variable.

Member Enumeration Documentation

◆ opsource

Enumerator
source_cl 
source_cf 

◆ options_enum

Enumerator
option_ConfigDir 
option_ConfigFile 
option_CopasiDir 
option_Home 
option_Tmp 
option_Verbose 
option_NoLogo 
option_License 
option_Validate 
option_Save 
option_ImportSBML 
option_ExportSBML 
option_SBMLSchema 
option_ImportCombineArchive 
option_ExportCombineArchive 
option_ImportSEDML 
option_ExportSEDML 
option_ExportBerkeleyMadonna 
option_ExportC 
option_ExportXPPAUT 
option_MaxTime 
option_ConvertToIrreversible 
option_ReportFile 
option_ScheduledTask 
option_ReparameterizeModel 
option_ExportIni 
option_SedmlTask 
option_PrintSedMLTasks 

◆ parser_state

Enumerator
state_option 
state_value 
state_consume 

Constructor & Destructor Documentation

◆ COptionParser()

copasi::COptionParser::COptionParser ( void  )

default constructor

References locations_.

Member Function Documentation

◆ finalize()

void copasi::COptionParser::finalize ( void  )

finalize all parsing (eg. check for mandatory options)

◆ get_locations()

const option_locations& copasi::COptionParser::get_locations ( void  ) const
inline

get the main option locations

References locations_.

◆ get_non_options()

const std::vector<std::string>& copasi::COptionParser::get_non_options ( void  ) const
inline

get a list of nonoptions from the command line

References non_options_.

Referenced by COptions::init().

◆ get_options()

const options& copasi::COptionParser::get_options ( void  ) const
inline

get the main options

References options_.

Referenced by COptions::init().

◆ parse() [1/2]

void copasi::COptionParser::parse ( const char *  fileName)

parse a file

◆ parse() [2/2]

void copasi::COptionParser::parse ( int  argc,
char *  argv[],
bool  call_finalize = true 
)

parse the command line

Referenced by COptions::init().

◆ parse_element()

void copasi::COptionParser::parse_element ( const char *  element,
int  position,
opsource  source 
)
private

◆ parse_long_option()

void copasi::COptionParser::parse_long_option ( const char *  option,
int  position,
opsource  source 
)
private

◆ parse_short_option()

void copasi::COptionParser::parse_short_option ( char  option,
int  position,
opsource  source 
)
private

◆ parse_value()

Member Data Documentation

◆ locations_

option_locations copasi::COptionParser::locations_
private

Referenced by COptionParser(), and get_locations().

◆ non_options_

std::vector<std::string> copasi::COptionParser::non_options_
private

Referenced by get_non_options().

◆ openum_

enum copasi::COptionParser::options_enum copasi::COptionParser::openum_
private

◆ options_

options copasi::COptionParser::options_
private

Referenced by get_options().

◆ state_

enum copasi::COptionParser::parser_state copasi::COptionParser::state_
private

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