mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: ValueMap ArrayCtrl::GetMap
git-svn-id: svn://ultimatepp.org/upp/trunk@7760 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d4234720b3
commit
8f4fa2966a
5 changed files with 33 additions and 5 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue