cloudy  trunk
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
Parser Class Reference

#include <parser.h>

Collaboration diagram for Parser:
Collaboration graph
[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
 
bool isVar (void) const
 
std::string getVarName (void)
 
void doSetVar (void)
 
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 getRawTail ()
 
void help (FILE *fp) const
 
double getWave ()
 
double getWaveOpt ()
 
void getLineID (char *LabelBuf, realnum *wave)
 

Data Fields

long int m_nqh
 
long int m_nInitFile
 
bool m_lgDSet
 
bool m_lgEOF
 

Private Member Functions

void init (void)
 
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
 
std::map< string, double > m_symtab
 

Detailed Description

Parser class holds pointer to string currently being analysed

Definition at line 31 of file parser.h.

Constructor & Destructor Documentation

§ Parser() [1/2]

Parser::Parser ( void  )
inlineexplicit

Definition at line 44 of file parser.h.

§ Parser() [2/2]

Parser::Parser ( const CloudyCommand commands)
inlineexplicit

Definition at line 48 of file parser.h.

Member Function Documentation

§ chPoint()

char Parser::chPoint ( void  ) const
inlineprivate

Definition at line 83 of file parser.h.

References FFmtRead().

Here is the call graph for this function:

§ Command()

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

Definition at line 187 of file parser.h.

Referenced by ParseCommands().

§ CommandError()

NORETURN void Parser::CommandError ( void  ) const

Definition at line 154 of file parser.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, and ioQQQ.

Referenced by ParseCommands().

§ doSetVar()

void Parser::doSetVar ( void  )

Definition at line 119 of file parser.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, FFmtRead(), and ioQQQ.

Referenced by ParseCommands().

Here is the call graph for this function:

§ echo()

void Parser::echo ( void  ) const

Definition at line 147 of file parser.cpp.

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

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

Here is the call graph for this function:

§ FFmtRead()

double Parser::FFmtRead ( void  )

§ getCommand()

string Parser::getCommand ( long  i)
inline

Definition at line 215 of file parser.h.

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

§ GetElem()

long int Parser::GetElem ( void  ) const

Definition at line 209 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:

§ getline()

bool Parser::getline ( void  )

§ getLineID()

void Parser::getLineID ( char *  LabelBuf,
realnum wave 
)

Definition at line 446 of file parser.cpp.

Referenced by parse_save_line().

§ getNumberCheck()

double Parser::getNumberCheck ( const char *  chDesc)

Definition at line 273 of file parser.cpp.

References FFmtRead().

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

Here is the call graph for this function:

§ getNumberCheckAlwaysLog()

double Parser::getNumberCheckAlwaysLog ( const char *  chDesc)

Definition at line 308 of file parser.cpp.

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

§ getNumberCheckAlwaysLogLim()

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

Definition at line 314 of file parser.cpp.

References ioQQQ.

Referenced by ParseDynaTime().

§ getNumberCheckLogLinNegImplLog()

double Parser::getNumberCheckLogLinNegImplLog ( const char *  chDesc)

Definition at line 291 of file parser.cpp.

References nMatch().

Referenced by abund_starburst().

Here is the call graph for this function:

§ getNumberDefault()

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

Definition at line 282 of file parser.cpp.

References FFmtRead().

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

Here is the call graph for this function:

§ getNumberDefaultAlwaysLog()

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

Definition at line 327 of file parser.cpp.

References FFmtRead().

Referenced by ParseDarkMatter(), and ParseDynaTime().

Here is the call graph for this function:

§ getNumberDefaultNegImplLog()

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

Definition at line 336 of file parser.cpp.

References FFmtRead().

Referenced by diatomics::H2_ParseSave().

Here is the call graph for this function:

§ getNumberPlain()

double Parser::getNumberPlain ( const char *  chDesc)

Definition at line 269 of file parser.cpp.

References FFmtRead().

Referenced by ParseDynaWind().

Here is the call graph for this function:

§ GetParam()

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

Definition at line 139 of file parser.h.

References FFmtRead().

Referenced by ParseMonitorResults().

Here is the call graph for this function:

§ GetQuote()

int Parser::GetQuote ( char *  chLabel,
bool  lgABORT 
)
inline

§ GetRange()

bool Parser::GetRange ( const char *  chKey,
double *  val1,
double *  val2 
)
inline

Definition at line 148 of file parser.h.

References FFmtRead().

Referenced by ParseMonitorResults().

Here is the call graph for this function:

§ getRawTail()

string Parser::getRawTail ( )
inline

Definition at line 220 of file parser.h.

Referenced by ParseBackgrd(), and ParseTitle().

§ getVarName()

std::string Parser::getVarName ( void  )

Definition at line 106 of file parser.cpp.

§ getWave()

double Parser::getWave ( )

Definition at line 260 of file parser.cpp.

Referenced by ParseMonitorResults(), and ParseNorm().

§ getWaveOpt()

double Parser::getWaveOpt ( )

Definition at line 244 of file parser.cpp.

References FFmtRead().

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

Here is the call graph for this function:

§ help()

void Parser::help ( FILE *  fp) const

Definition at line 182 of file parser.cpp.

References cdEXIT, DEBUG_ENTRY, and EXIT_SUCCESS.

Referenced by ParseHelp().

§ init()

void Parser::init ( void  )
inlineprivate

Definition at line 53 of file parser.h.

§ isCommandComment()

bool Parser::isCommandComment ( void  ) const

Definition at line 97 of file parser.cpp.

Referenced by ParseCommands().

§ isComment()

bool Parser::isComment ( void  ) const

Definition at line 93 of file parser.cpp.

References lgInputComment().

Referenced by ParseAbundances(), and ParseInterp().

Here is the call graph for this function:

§ isVar()

bool Parser::isVar ( void  ) const

Definition at line 102 of file parser.cpp.

Referenced by ParseCommands().

§ last()

bool Parser::last ( void  ) const
inline

Definition at line 200 of file parser.h.

Referenced by ParseCommands(), and ParseInterp().

§ lgEOL()

bool Parser::lgEOL ( void  ) const
inline

§ newlineProcess()

void Parser::newlineProcess ( void  )
inlineprivate

Definition at line 59 of file parser.h.

References caps(), and INPUT_LINE_LENGTH.

Here is the call graph for this function:

§ nMatch()

bool Parser::nMatch ( const char *  chKey) const
inline

§ nMatch1()

int Parser::nMatch1 ( const char *  chKey) const
inlineprivate

Definition at line 108 of file parser.h.

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

Here is the call graph for this function:

§ nMatchErase()

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

Definition at line 158 of file parser.h.

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

§ NoNumb()

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

§ nWord()

const char * Parser::nWord ( const char *  chKey) const

Definition at line 30 of file parser.cpp.

References nWord().

Referenced by ParseAge(), and parserProcess().

Here is the call graph for this function:

§ PrintLine()

int Parser::PrintLine ( FILE *  fp) const
inline

§ set_point()

void Parser::set_point ( long int  ipnt)
inline

Definition at line 77 of file parser.h.

References nWord().

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

Here is the call graph for this function:

§ setEOL()

void Parser::setEOL ( bool  val)
inline

Definition at line 102 of file parser.h.

References NORETURN.

Referenced by ParseSet().

§ setline()

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

Definition at line 69 of file parser.h.

References ASSERT, and INPUT_LINE_LENGTH.

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

§ StandardEnergyUnit()

const char * Parser::StandardEnergyUnit ( void  ) const

Definition at line 174 of file parser.cpp.

References StandardEnergyUnit().

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

Here is the call graph for this function:

§ StandardFluxUnit()

string Parser::StandardFluxUnit ( void  ) const

Definition at line 178 of file parser.cpp.

References StandardFluxUnit().

Referenced by ParseOptimize(), and ParseStop().

Here is the call graph for this function:

§ strcmp()

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

Field Documentation

§ m_card

char Parser::m_card[INPUT_LINE_LENGTH]
private

Definition at line 33 of file parser.h.

§ m_card_raw

char Parser::m_card_raw[INPUT_LINE_LENGTH]
private

Definition at line 33 of file parser.h.

§ m_Commands

const CloudyCommand* const Parser::m_Commands
private

Definition at line 38 of file parser.h.

§ m_len

long int Parser::m_len
private

Definition at line 35 of file parser.h.

§ m_lgDSet

bool Parser::m_lgDSet

Definition at line 42 of file parser.h.

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

§ m_lgEOF

bool Parser::m_lgEOF

§ m_lgEOL

bool Parser::m_lgEOL
private

Definition at line 37 of file parser.h.

§ m_nInitFile

long int Parser::m_nInitFile

Definition at line 41 of file parser.h.

Referenced by ParseCommands(), and ParseInitCount().

§ m_nqh

long int Parser::m_nqh

§ m_ptr

const char* Parser::m_ptr
private

Definition at line 36 of file parser.h.

§ m_symtab

std::map<string,double> Parser::m_symtab
private

Definition at line 39 of file parser.h.


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