search for: requiredkey

Displaying 1 result from an estimated 1 matches for "requiredkey".

Did you mean: requiredby
2012 Jul 25
1
[LLVMdev] [RFC] YAML I/O
...llvm::yaml::Sequence; using llvm::yaml::DocumentList; using llvm::yaml::IO; using llvm::yaml::Input; using llvm::yaml::Output; using llvm::yaml::YamlMap; struct Person : public YamlMap { StringRef name; uint8_t age; bool speaks_french; void yamlMapping(IO &io) { requiredKey(io, name, "name"); requiredKey(io, age, "age"); optionalKey(io, speaks_french, "speaks-french"); } }; typedef Sequence<Person> PersonList; typedef DocumentList<PersonList> PersonDocumentList; That's it. The yaml...