Add more examles, including using range-based for loops for iterating over `YAML::Node`s (link to my examples)

オープン
#1,127 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, yaml
領域
documentation

調査の方向性

Start with the README examples and the linked demo file, cpp/yaml-cpp_lib_demo.cpp. Review how the README links to examples and how the demo iterates over YAML sequences and maps; the issue proposes linking the demo and adding range-based loop examples. Done looks like the README points to the examples and readers can find sequence and map iteration guidance.

索引モデルが issue の本文から書いたものです。

説明

I really think you need some more examples, especially how to iterate over Sequences (lists) and Maps using range-based for loops.

I suggest you link to my examples here, in your readme: https://github.com/ElectricRCAircraftGuy/eRCaGuy_hello_world/blob/master/cpp/yaml-cpp_lib_demo.cpp

I'll add range-based for loop examples to my demo code above tonight, including like this, for example, to iterate over a Map:

    YAML::Node data_phi = root_node["data"][6];
    assert(data_phi.IsMap());

    for (const std::pair<YAML::Node, YAML::Node>& keyValue : data_phi)
    {
        std::string key = keyValue.first.as<std::string>();
        std::string value = keyValue.second.as<std::string>();
        printf("key = %-15s value = %-15s\n", key.c_str(), value.c_str());
    }
主要言語
C++
スター
6.1k
フォーク
2.2k
平均マージ
22時間 2分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jbeder/yaml-cpp のほかの issue

jbeder/yaml-cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。