MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
PrintSymbolTableDR Struct Reference
Inheritance diagram for PrintSymbolTableDR:
Collaboration diagram for PrintSymbolTableDR:

Public Member Functions

bool Read (HighParser &HP)
 
- Public Member Functions inherited from DescRead
virtual ~DescRead (void)
 

Detailed Description

Definition at line 367 of file parser.cc.

Member Function Documentation

bool PrintSymbolTableDR::Read ( HighParser HP)
virtual

Implements DescRead.

Definition at line 373 of file parser.cc.

References HighParser::GetLineData(), HighParser::GetMathParser(), MathParser::GetNameSpace(), MathParser::GetNameSpaceMap(), HighParser::GetString(), MathParser::GetSymbolTable(), MathParser::NameSpace::GetTable(), HighParser::IsArg(), and HighParser::IsKeyWord().

374 {
375  if (!HP.IsArg()) {
376  silent_cout( "math parser symbol table at line "
377  << HP.GetLineData() << ":" << std::endl
378  << HP.GetMathParser().GetSymbolTable() << std::endl);
379  return true;
380  }
381 
382  if (HP.IsKeyWord("all")) {
384  for (MathParser::NameSpaceMap::const_iterator i = ns.begin(); i != ns.end(); ++i) {
385  const std::string& sName = i->second->sGetName();
386  const Table *pT = i->second->GetTable();
387  if (pT != 0) {
388  silent_cout( "namespace \"" << sName << "\" symbol table at line "
389  << HP.GetLineData() << ":" << std::endl
390  << *pT << std::endl);
391  }
392  }
393 
394  return true;
395  }
396 
397  while (HP.IsArg()) {
398  const char *sName = HP.GetString();
400  if (pN == 0) {
401  silent_cerr("PrintSymbolTableDR::Read(): warning, unable to find namespace \"" << sName << "\" at line "
402  << HP.GetLineData() << std::endl);
403 
404  } else {
405  Table *pT = pN->GetTable();
406  if (pT == 0) {
407  silent_cerr("PrintSymbolTableDR::Read(): warning, namespace \"" << sName << "\" "
408  "has no symbol table at line " << HP.GetLineData() << std::endl);
409 
410  } else {
411  silent_cout( "namespace \"" << sName << "\" symbol table at line "
412  << HP.GetLineData() << ":" << std::endl
413  << *pT << std::endl);
414  }
415  }
416  }
417 
418  return true;
419 }
std::map< std::string, NameSpace * > NameSpaceMap
Definition: mathp.h:351
virtual HighParser::ErrOut GetLineData(void) const
Definition: parser.cc:681
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
const NameSpaceMap & GetNameSpaceMap(void) const
Definition: mathp.cc:1984
virtual MathParser & GetMathParser(void)
Definition: parser.cc:668
virtual std::string GetString(const std::string &sDefVal)
Definition: parser.cc:1074
NameSpace * GetNameSpace(const std::string &name) const
Definition: mathp.cc:4620
virtual bool IsArg(void)
Definition: parser.cc:807
Definition: table.h:43
virtual Table * GetTable(void)=0
Table & GetSymbolTable(void) const
Definition: mathp.cc:1931

Here is the call graph for this function:


The documentation for this struct was generated from the following file: