mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
28 lines
549 B
C++
28 lines
549 B
C++
#include "CtrlPropCommon.h"
|
|
|
|
VectorMap<String, int> BidirProps(Ctrl& c)
|
|
{
|
|
VectorMap<String, int> is;
|
|
|
|
Value vs;
|
|
Props<Ctrl>::Get(c, "listset", vs);
|
|
if(!vs.Is<ValueArray>()) return is;
|
|
ValueArray vas = vs;
|
|
for(int i = 0; i < vas.GetCount(); i++)
|
|
{
|
|
int& m = is.GetAdd(vas.Get(i), 0);
|
|
m |= 1;
|
|
}
|
|
|
|
Value vg;
|
|
Props<Ctrl>::Get(c, "listget", vg);
|
|
if(!vg.Is<ValueArray>()) return is;
|
|
ValueArray vag = vg;
|
|
for(int i = 0; i < vag.GetCount(); i++)
|
|
{
|
|
int& m = is.GetAdd(vag.Get(i), 0);
|
|
m |= 2;
|
|
}
|
|
|
|
return is;
|
|
}
|