28 if(attributes.find(attributeName) == attributes.end())
30 tsinfo(
"Attribute of entry %d (%s) with name=%s not found",
id,lexeme.c_str(),attributeName.c_str());
35 tsdebug(
"Attribute of entry %d (%s) with name=%s found",
id,lexeme.c_str(),attributeName.c_str());
36 return attributes[attributeName];
42 if(attributes.find(attributeName) == attributes.end())
44 tsinfo(
"Setting new attribute of entry %d (%s) with name=%s",
id,lexeme.c_str(),attributeName.c_str());
48 tsinfo(
"Attribute of entry %d (%s) with name=%s already exist. Overwriting previous value...",
id,lexeme.c_str(),attributeName.c_str());
49 delete attributes[attributeName];
57 if(attributes.find(attributeName) == attributes.end())
59 tsinfo(
"Setting new attribute of entry %d (%s) with name=%s & value=%s",
id,lexeme.c_str(),attributeName.c_str(),value);
63 tsinfo(
"Attribute of entry %d (%s) with name=%s already exist. Overwriting previous value with the new one (%s)",
id,lexeme.c_str(),attributeName.c_str(),value);
64 delete attributes[attributeName];
72 if(attributes.find(attributeName) == attributes.end())
74 tserror(
"Attribute of entry %d (%s) with name=%s does not exist",
id,lexeme.c_str(), attributeName.c_str());
79 attributes.erase(attributeName);
80 tsinfo(
"Attribute of entry %d (%s) with name=%s successfully deleted",
id,lexeme.c_str(), attributeName.c_str());
void _setDisplacement(int displacement)
AttributeValue * getAttribute(const std::string &attributeName)
void setStringAttribute(const std::string &attributeName, const char *value)
void setNumericAttribute(const std::string &attributeName, long long value)
bool deleteAttribute(const std::string &attributeName)
Entry(SymbolTable *parentTable, const std::string &lexeme, int id)
long long getDisplacement()
std::string getLexeme() const
std::unordered_map< std::string, AttributeValue * > & _getAttributesStorage()