Parser Class Reference

#include <parser.h>

Collaboration diagram for Parser:
[legend]

Public Member Functions

 Parser (void)
 Parser (const CloudyCommand *commands)
bool getline (void)
void setline (const char *const card)
void set_point (long int ipnt)
const char * nWord (const char *chKey) const
long int GetElem (void) const
double FFmtRead (void)
double getNumberPlain (const char *chDesc)
double getNumberCheck (const char *chDesc)
double getNumberDefault (const char *chDesc, double fdef)
double getNumberCheckLogLinNegImplLog (const char *chDesc)
double getNumberCheckAlwaysLog (const char *chDesc)
double getNumberCheckAlwaysLogLim (const char *chDesc, double flim)
double getNumberDefaultAlwaysLog (const char *chDesc, double fdef)
double getNumberDefaultNegImplLog (const char *chDesc, double fdef)
bool lgEOL (void) const
void setEOL (bool val)
NORETURN void NoNumb (const char *chDesc) const
bool nMatch (const char *chKey) const
bool GetParam (const char *chKey, double *val)
bool GetRange (const char *chKey, double *val1, double *val2)
bool nMatchErase (const char *chKey)
int strcmp (const char *s2)
bool Command (const char *name, OptionParser doOpts)
bool isComment (void) const
bool isCommandComment (void) const
void echo (void) const
bool last (void) const
int PrintLine (FILE *fp) const
NORETURN void CommandError (void) const
int GetQuote (char *chLabel, bool lgABORT)
const char * StandardEnergyUnit (void) const
string StandardFluxUnit (void) const
string getCommand (long i)
string getCommandRaw (long i)
string getRawTail ()
void help (FILE *fp) const
double getWave ()
double getWaveOpt ()

Data Fields

long int m_nqh
long int m_nInitFile
bool m_lgDSet
bool m_lgEOF

Private Member Functions

void newlineProcess (void)
char chPoint (void) const
int nMatch1 (const char *chKey) const

Private Attributes

char m_card [INPUT_LINE_LENGTH]
char m_card_raw [INPUT_LINE_LENGTH]
long int m_len
const char * m_ptr
bool m_lgEOL
const CloudyCommand *const m_Commands

Detailed Description

Parser class holds pointer to string currently being analysed

Definition at line 30 of file parser.h.


Constructor & Destructor Documentation

Parser::Parser ( void   )  [inline, explicit]

Definition at line 42 of file parser.h.

References setline().

Here is the call graph for this function:

Parser::Parser ( const CloudyCommand commands  )  [inline, explicit]

Definition at line 46 of file parser.h.

References setline().

Here is the call graph for this function:


Member Function Documentation

char Parser::chPoint ( void   )  const [inline, private]

Definition at line 75 of file parser.h.

References m_ptr.

Referenced by getWaveOpt().

bool Parser::Command ( const char *  name,
OptionParser  doOpts 
) [inline]

Definition at line 179 of file parser.h.

References strcmp().

Referenced by ParseCommands().

Here is the call graph for this function:

NORETURN void Parser::CommandError ( void   )  const

Definition at line 87 of file parser.cpp.

References cdEXIT, DEBUG_ENTRY, ioQQQ, m_card, and PrintLine().

Referenced by ParseCommands().

Here is the call graph for this function:

void Parser::echo ( void   )  const

Definition at line 80 of file parser.cpp.

References called, ioQQQ, t_called::lgTalk, m_card, m_card_raw, and nMatch().

Referenced by ParseAbundances(), ParseCommands(), and ParseInterp().

Here is the call graph for this function:

double Parser::FFmtRead ( void   ) 

Definition at line 286 of file parser.cpp.

References DEBUG_ENTRY, ioQQQ, m_card, m_len, m_lgEOL, m_ptr, ParseExpr(), Token::symNumber, and Token::symOp.

Referenced by getNumberCheck(), getNumberDefault(), getNumberDefaultAlwaysLog(), getNumberDefaultNegImplLog(), getNumberPlain(), GetOptColDen(), GetOptLineInt(), GetOptTemp(), GetParam(), GetRange(), getWaveOpt(), parse_save_average(), parse_save_colden(), Parse_Save_Line_RT(), ParseAbsMag(), ParseAbundances(), ParseAge(), ParseAgn(), ParseAperture(), ParseAtomH2(), ParseAtomISO(), ParseBackgrd(), ParseBlackbody(), ParseBremsstrahlung(), ParseCaseB(), ParseCExtra(), ParseCMBOuter(), ParseCompile(), ParseConstant(), ParseCoronal(), ParseCosmicRays(), ParseCosmology(), ParseCovering(), ParseCrashDo(), ParseCylinder(), ParseDiffuse(), ParseDistance(), ParseDLaw(), ParseEden(), ParseElement(), ParseEnergy(), ParseExtinguish(), ParseF_nu(), ParseFail(), ParseFill(), ParseFluc(), ParseForceTemperature(), ParseFudge(), ParseGlobule(), ParseGrain(), ParseGravity(), ParseGrid(), ParseHDEN(), ParseHExtra(), ParseIlluminate(), ParseIntensity(), ParseInterp(), ParseIonPar(), ParseIterations(), ParseLaser(), ParseLuminosity(), ParseMap(), ParseMetal(), ParseMonitorResults(), ParseNeutrons(), ParseNorm(), ParseOptimize(), ParsePhi(), ParsePlotRangeContin(), ParsePlotRangeOption(), ParsePowerlawContinuum(), ParsePrint(), ParseQH(), ParseRadius(), ParseRangeOption(), ParseRatio(), ParseSave(), ParseSet(), ParseSphere(), ParseStop(), ParseTable(), ParseTauMin(), ParseTLaw(), ParseTrace(), ParseTurbulence(), and ParseVLaw().

Here is the call graph for this function:

string Parser::getCommand ( long  i  )  [inline]

Definition at line 204 of file parser.h.

References m_card, and m_ptr.

Referenced by GetOptColDen(), GetOptLineInt(), GetOptTemp(), parse_save_colden(), and ParsePrtLineSum().

string Parser::getCommandRaw ( long  i  )  [inline]

Definition at line 209 of file parser.h.

References m_card, m_card_raw, and m_ptr.

Referenced by parse_save_line().

long int Parser::GetElem ( void   )  const

Definition at line 142 of file parser.cpp.

References t_elementnames::chElementNameShort, DEBUG_ENTRY, elementnames, LIMELM, and nMatch().

Referenced by parse_save_average(), ParseAtomISO(), ParseElement(), ParseMonitorResults(), ParsePrint(), ParseSave(), ParseSet(), and ParseTrace().

Here is the call graph for this function:

bool Parser::getline ( void   ) 
double Parser::getNumberCheck ( const char *  chDesc  ) 

Definition at line 206 of file parser.cpp.

References FFmtRead(), lgEOL(), and NoNumb().

Referenced by getNumberCheckAlwaysLog(), getNumberCheckAlwaysLogLim(), getNumberCheckLogLinNegImplLog(), ParseAtomFeII(), ParseDynaWind(), and ParseMagnet().

Here is the call graph for this function:

double Parser::getNumberCheckAlwaysLog ( const char *  chDesc  ) 

Definition at line 241 of file parser.cpp.

References getNumberCheck(), and pow().

Referenced by ParseDarkMatter(), ParseDynaTime(), and ParseMagnet().

Here is the call graph for this function:

double Parser::getNumberCheckAlwaysLogLim ( const char *  chDesc,
double  flim 
)

Definition at line 247 of file parser.cpp.

References getNumberCheck(), ioQQQ, and pow().

Referenced by ParseDynaTime().

Here is the call graph for this function:

double Parser::getNumberCheckLogLinNegImplLog ( const char *  chDesc  ) 

Definition at line 224 of file parser.cpp.

References getNumberCheck(), nMatch(), and pow().

Referenced by abund_starburst().

Here is the call graph for this function:

double Parser::getNumberDefault ( const char *  chDesc,
double  fdef 
)

Definition at line 215 of file parser.cpp.

References FFmtRead(), and lgEOL().

Referenced by H2_ParseSave(), ParseDynaWind(), and ParseMagnet().

Here is the call graph for this function:

double Parser::getNumberDefaultAlwaysLog ( const char *  chDesc,
double  fdef 
)

Definition at line 260 of file parser.cpp.

References FFmtRead(), lgEOL(), and pow().

Referenced by ParseDarkMatter(), and ParseDynaTime().

Here is the call graph for this function:

double Parser::getNumberDefaultNegImplLog ( const char *  chDesc,
double  fdef 
)

Definition at line 269 of file parser.cpp.

References FFmtRead(), lgEOL(), and pow().

Referenced by H2_ParseSave().

Here is the call graph for this function:

double Parser::getNumberPlain ( const char *  chDesc  ) 

Definition at line 202 of file parser.cpp.

References FFmtRead().

Referenced by ParseDynaWind().

Here is the call graph for this function:

bool Parser::GetParam ( const char *  chKey,
double *  val 
) [inline]

Definition at line 131 of file parser.h.

References FFmtRead(), m_card, m_ptr, and nMatch1().

Referenced by ParseMonitorResults().

Here is the call graph for this function:

int Parser::GetQuote ( char *  chLabel,
bool  lgABORT 
) [inline]
bool Parser::GetRange ( const char *  chKey,
double *  val1,
double *  val2 
) [inline]

Definition at line 140 of file parser.h.

References FFmtRead(), m_card, m_ptr, and nMatch1().

Referenced by ParseMonitorResults().

Here is the call graph for this function:

string Parser::getRawTail (  )  [inline]

Definition at line 214 of file parser.h.

References m_card, m_card_raw, and m_ptr.

Referenced by ParseBackgrd(), and ParseTitle().

double Parser::getWave (  ) 

Definition at line 193 of file parser.cpp.

References getWaveOpt(), lgEOL(), and NoNumb().

Referenced by ParseMonitorResults(), and ParseNorm().

Here is the call graph for this function:

double Parser::getWaveOpt (  ) 

Definition at line 177 of file parser.cpp.

References chPoint(), and FFmtRead().

Referenced by GetOptLineInt(), getWave(), parse_save_line(), ParsePrint(), ParsePrtLineSum(), and ParseStop().

Here is the call graph for this function:

void Parser::help ( FILE *  fp  )  const

Definition at line 115 of file parser.cpp.

References cdEXIT, DEBUG_ENTRY, and m_Commands.

Referenced by ParseHelp().

bool Parser::isCommandComment ( void   )  const

Definition at line 74 of file parser.cpp.

References isComment(), and m_card.

Referenced by ParseCommands().

Here is the call graph for this function:

bool Parser::isComment ( void   )  const

Definition at line 70 of file parser.cpp.

References lgInputComment(), and m_card.

Referenced by isCommandComment(), ParseAbundances(), and ParseInterp().

Here is the call graph for this function:

bool Parser::last ( void   )  const [inline]

Definition at line 189 of file parser.h.

References m_card, and m_lgEOF.

Referenced by ParseCommands(), and ParseInterp().

bool Parser::lgEOL ( void   )  const [inline]
void Parser::newlineProcess ( void   )  [inline, private]

Definition at line 51 of file parser.h.

References caps(), INPUT_LINE_LENGTH, m_card, m_card_raw, m_len, m_lgEOL, and m_ptr.

Referenced by getline(), and setline().

Here is the call graph for this function:

bool Parser::nMatch ( const char *  chKey  )  const [inline]
int Parser::nMatch1 ( const char *  chKey  )  const [inline, private]

Definition at line 100 of file parser.h.

References ASSERT, isBoundaryChar(), m_card, nMatch(), and nWord().

Referenced by GetParam(), GetRange(), nMatch(), and nMatchErase().

Here is the call graph for this function:

bool Parser::nMatchErase ( const char *  chKey  )  [inline]

Definition at line 150 of file parser.h.

References m_card, and nMatch1().

Referenced by ParseCompile(), ParseGrain(), ParseMonitorResults(), ParseSave(), and ParseTable().

Here is the call graph for this function:

NORETURN void Parser::NoNumb ( const char *  chDesc  )  const
const char * Parser::nWord ( const char *  chKey  )  const

Definition at line 24 of file parser.cpp.

References m_card.

Referenced by nMatch1(), ParseAge(), and parserProcess().

int Parser::PrintLine ( FILE *  fp  )  const [inline]
void Parser::set_point ( long int  ipnt  )  [inline]

Definition at line 69 of file parser.h.

References m_card, and m_ptr.

Referenced by ParseBackgrd(), ParseCMBOuter(), ParseRangeOption(), and ParseTest().

void Parser::setEOL ( bool  val  )  [inline]

Definition at line 94 of file parser.h.

References m_lgEOL.

Referenced by ParseSet().

void Parser::setline ( const char *const   card  )  [inline]

Definition at line 61 of file parser.h.

References ASSERT, INPUT_LINE_LENGTH, m_card_raw, and newlineProcess().

Referenced by ParseAbundances(), ParseBackgrd(), ParseCMBOuter(), ParseDrive(), Parser(), and ParseTest().

Here is the call graph for this function:

const char * Parser::StandardEnergyUnit ( void   )  const

Definition at line 107 of file parser.cpp.

References m_card.

Referenced by ChkUnits(), ParseOptimize(), ParseSet(), and ParseStop().

string Parser::StandardFluxUnit ( void   )  const

Definition at line 111 of file parser.cpp.

References m_card.

Referenced by ParseOptimize(), and ParseStop().

int Parser::strcmp ( const char *  s2  )  [inline]

Field Documentation

const CloudyCommand* const Parser::m_Commands [private]

Definition at line 37 of file parser.h.

Referenced by help().

long int Parser::m_len [private]

Definition at line 34 of file parser.h.

Referenced by FFmtRead(), and newlineProcess().

Definition at line 40 of file parser.h.

Referenced by ParseAbundances(), ParseCommands(), and ParseGrain().

bool Parser::m_lgEOL [private]

Definition at line 36 of file parser.h.

Referenced by FFmtRead(), lgEOL(), newlineProcess(), and setEOL().

Definition at line 39 of file parser.h.

Referenced by ParseCommands(), and ParseInitCount().

long int Parser::m_nqh
const char* Parser::m_ptr [private]

The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1