MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
KeyTable Class Reference

#include <parser.h>

Collaboration diagram for KeyTable:

Public Member Functions

 KeyTable (HighParser &hp, const char *const sTable[])
 
virtual ~KeyTable (void)
 
int Find (const char *sToFind) const
 

Private Attributes

char *const * sKeyWords
 
const KeyTableoldKey
 
HighParserHP
 

Detailed Description

Definition at line 184 of file parser.h.

Constructor & Destructor Documentation

KeyTable::KeyTable ( HighParser hp,
const char *const  sTable[] 
)

Definition at line 254 of file parser.cc.

References HP, oldKey, HighParser::PutKeyTable(), and sKeyWords.

255 : sKeyWords(0), oldKey(0), HP(hp)
256 {
257  sKeyWords = (char* const*)sTable;
258  oldKey = HP.PutKeyTable(*this);
259 }
const KeyTable * oldKey
Definition: parser.h:187
virtual const KeyTable * PutKeyTable(const KeyTable &KT)
Definition: parser.cc:658
HighParser & HP
Definition: parser.h:188
char *const * sKeyWords
Definition: parser.h:186

Here is the call graph for this function:

KeyTable::~KeyTable ( void  )
virtual

Definition at line 262 of file parser.cc.

References HP, oldKey, and HighParser::PutKeyTable().

263 {
264  if (oldKey) {
265  (void)HP.PutKeyTable(*oldKey);
266  }
267 }
const KeyTable * oldKey
Definition: parser.h:187
virtual const KeyTable * PutKeyTable(const KeyTable &KT)
Definition: parser.cc:658
HighParser & HP
Definition: parser.h:188

Here is the call graph for this function:

Member Function Documentation

int KeyTable::Find ( const char *  sToFind) const

Definition at line 271 of file parser.cc.

References sKeyWords.

Referenced by HighParser::GetWord(), HighParser::iGetDescription_int(), and HighParser::IsKeyWord().

272 {
273  for (int iCnt = 0; sKeyWords[iCnt]; iCnt++) {
274  if (strcasecmp(sKeyWords[iCnt], sToFind) == 0) {
275  return iCnt;
276  }
277  }
278 
279  return -1;
280 }
char *const * sKeyWords
Definition: parser.h:186

Member Data Documentation

HighParser& KeyTable::HP
private

Definition at line 188 of file parser.h.

Referenced by KeyTable(), and ~KeyTable().

const KeyTable* KeyTable::oldKey
private

Definition at line 187 of file parser.h.

Referenced by KeyTable(), and ~KeyTable().

char* const* KeyTable::sKeyWords
private

Definition at line 186 of file parser.h.

Referenced by Find(), and KeyTable().


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