CtrlLib: ValueMap ArrayCtrl::GetMap

git-svn-id: svn://ultimatepp.org/upp/trunk@7760 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-10-08 12:00:06 +00:00
parent d4234720b3
commit 8f4fa2966a
5 changed files with 33 additions and 5 deletions

View file

@ -1952,6 +1952,17 @@ void ArrayCtrl::AddMap(const ValueMap& m)
SetMap(array.GetCount(), m);
}
ValueMap ArrayCtrl::GetMap(int i) const
{
ValueMap m;
for(int j = 0; j < GetIndexCount(); j++) {
String id = ~GetId(j);
if(id.GetCount())
m(id, Get(i, j));
}
return m;
}
void ArrayCtrl::SetArray(int i, const ValueArray& va)
{
Set(i, va.Get());