Value Namespace::Get(const String& field) const
{
+ ObjectLock olock(this);
+
Value value;
if (!GetOwnField(field, &value))
BOOST_THROW_EXCEPTION(ScriptError("Namespace does not contain field '" + field + "'"));
bool Namespace::Get(const String& field, Value *value) const
{
+ ObjectLock olock(this);
+
auto nsVal = GetAttribute(field);
if (!nsVal)
void Namespace::Set(const String& field, const Value& value, bool overrideFrozen)
{
+ ObjectLock olock(this);
+
return SetFieldByName(field, value, overrideFrozen, DebugInfo());
}
bool Namespace::Contains(const String& field) const
{
+ ObjectLock olock(this);
+
return HasOwnField(field);
}
void Namespace::Remove(const String& field, bool overrideFrozen)
{
+ ObjectLock olock(this);
+
m_Behavior->Remove(this, field, overrideFrozen);
}
Value Namespace::GetFieldByName(const String& field, bool, const DebugInfo& debugInfo) const
{
+ ObjectLock olock(this);
+
auto nsVal = GetAttribute(field);
if (nsVal)
void Namespace::SetFieldByName(const String& field, const Value& value, bool overrideFrozen, const DebugInfo& debugInfo)
{
+ ObjectLock olock(this);
+
auto nsVal = GetAttribute(field);
if (!nsVal)
bool Namespace::HasOwnField(const String& field) const
{
+ ObjectLock olock(this);
+
return GetAttribute(field) != nullptr;
}
bool Namespace::GetOwnField(const String& field, Value *result) const
{
+ ObjectLock olock(this);
+
auto nsVal = GetAttribute(field);
if (!nsVal)