ultimatepp/upptst/MapRange/MapRange.cpp
cxl ead5e1b717 .reference
git-svn-id: svn://ultimatepp.org/upp/trunk@9928 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-06-12 07:16:46 +00:00

43 lines
685 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
VectorMap<String, String> h;
for(int i = 0; i < 20; i++)
h("key" + AsString(i), "value" + AsString(i));
for(auto kv : ~h) {
DDUMP(kv.key);
DDUMP(kv.value);
}
DLOG("=========");
h.Unlink(11);
for(auto kv : ~h) {
DDUMP(kv.key);
DDUMP(kv.value);
kv.value = "123";
}
DLOG("=========");
const VectorMap<String, String>& ch = h;
for(auto kv : ~ch) {
DDUMP(kv.key);
DDUMP(kv.value);
}
DLOG("=========");
for(int i = 0; i < h.GetCount(); i++)
if(!h.IsUnlinked(i))
h.Unlink(i);
for(auto kv : ~h) {
DDUMP(kv.key);
DDUMP(kv.value);
}
}