Dynamic::Struct construction from std::map

This commit is contained in:
Aleksandar Fabijanic
2008-12-23 16:08:28 +00:00
parent 8a2502bce4
commit 8311cd078a
2 changed files with 52 additions and 4 deletions

View File

@@ -74,6 +74,14 @@ public:
{
}
template <typename T>
Struct(const std::map<K, T>& val)
{
std::map<K, T>::const_iterator it = val.begin();
std::map<K, T>::const_iterator end = val.end();
for (; it != end; ++it) _data.insert(ValueType(it->first, Var(it->second)));
}
virtual ~Struct()
/// Destroys the Struct.
{