ファイル test.yaml .....
---
map:
? [L, itsy] : ISO_LOW_ITSY(out, in, ctrl)
? [L, bitsy] : ISO_LOW_BITSY(out, in, ctrl)
? [L, spider] : ISO_LOW_SPIDER(out, in, ctrl)
? [H, ANY] : ISO_HIGH(out, in, ctrl)
yaml-cpp でこれらのいずれかにアクセスするには、どのコマンドを使用できますか。マップ全体にアクセスできますが、個々の要素にはアクセスできません。
これが私が試みていることです:
YAML::Node doc = YAML::LoadFile("test.yaml");
std::cout << "A:" << doc["mapping"] << std::endl;
std::cout << "LS1:" << doc["mapping"]["[L, spider]"] << std::endl;
std::cout << "LS2:" << doc["mapping"]["L", "spider"] << std::endl;
ここに私の結果があります:
A:? ? - L
- itsy
: ISO_LOW_ITSY(out, in, ctrl)
: ~
? ? - L
- bitsy
: ISO_LOW_BITSY(out, in, ctrl)
: ~
? ? - L
- spider
: ISO_LOW_SPIDER(out, in, ctrl)
: ~
? ? - H
- ANY
: ISO_HIGH(out, in, ctrl)
: ~
LS1:
LS2:
これが yaml-cpp でまだ可能でない場合は、それも知りたいです。