24 lines
489 B
C++
24 lines
489 B
C++
#include "IProperty.h"
|
|
|
|
namespace LifeCore
|
|
{
|
|
bool IProperty::ContainsAttribute(const String& name)
|
|
{
|
|
if(attributes.find(name) == attributes.end())
|
|
return false;
|
|
return true;
|
|
}
|
|
int IProperty::AddAttribute(const String& name, const String& value)
|
|
{
|
|
attributes[name] = value;
|
|
return SC_OK;
|
|
}
|
|
int IProperty::GetAttribute(const String& name, String& value)
|
|
{
|
|
if(attributes.find(name) == attributes.end())
|
|
return SC_FAIL;
|
|
|
|
value = attributes[name];
|
|
return SC_OK;
|
|
}
|
|
} |