m_Data.at(index) = value;
}
+/**
+ * Sets a value in the array.
+ *
+ * @param index The index.
+ * @param value The value.
+ */
+void Array::Set(unsigned int index, Value&& value)
+{
+ ObjectLock olock(this);
+
+ m_Data.at(index).Swap(value);
+}
+
/**
* Adds a value to the array.
*
m_Data.push_back(value);
}
+/**
+ * Adds a value to the array.
+ *
+ * @param value The value.
+ */
+void Array::Add(Value&& value)
+{
+ ObjectLock olock(this);
+
+ m_Data.push_back(value);
+}
+
/**
* Returns the number of elements in the array.
*
Value Get(unsigned int index) const;
void Set(unsigned int index, const Value& value);
+ void Set(unsigned int index, Value&& value);
void Add(const Value& value);
+ void Add(Value&& value);
/**
* Returns an iterator to the beginning of the array.
m_Data[key] = value;
}
+/**
+ * Sets a value in the dictionary.
+ *
+ * @param key The key.
+ * @param value The value.
+ */
+void Dictionary::Set(const String& key, Value&& value)
+{
+ ObjectLock olock(this);
+
+ m_Data[key].Swap(value);
+}
/**
* Returns the number of elements in the dictionary.
Value Get(const String& key) const;
bool Get(const String& key, Value *result) const;
void Set(const String& key, const Value& value);
+ void Set(const String& key, Value&& value);
bool Contains(const String& key) const;
/**
*
* @returns The type.
*/
- ValueType GetType(void) const
+ inline ValueType GetType(void) const
{
return static_cast<ValueType>(m_Value.which());
}
+ inline void Swap(Value& other)
+ {
+ m_Value.swap(other.m_Value);
+ }
+
String GetTypeName(void) const;
Type::Ptr GetReflectionType(void) const;