33 lines
570 B
C++
33 lines
570 B
C++
#include <http/table.hpp>
|
|
|
|
WORD Table::locateSymbolString(String &symbolString,int &tableIndex)
|
|
{
|
|
size_t numSymbols((size_t)size());
|
|
|
|
for(int index=0;index<numSymbols;index++)
|
|
{
|
|
if(operator[](index)==symbolString)
|
|
{
|
|
tableIndex=index;
|
|
return TRUE;
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
WORD Table::locateSymbolIdentifier(int symbolIdentifier,int &tableIndex)
|
|
{
|
|
size_t numSymbols((size_t)size());
|
|
|
|
for(int index=0;index<numSymbols;index++)
|
|
{
|
|
if(operator[](index).identifier()==symbolIdentifier)
|
|
{
|
|
tableIndex=index;
|
|
return TRUE;
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|