1. 06 Jun, 2016 1 commit
    • Mark Olesen's avatar
      ENH: cleanup Ostream to ease usage (issue #254) · 06f22a9b
      Mark Olesen authored
      - Include newline in beginBlock/endBlock, since this corresponds to
        the standard usage. The beginBlock now takes keyType instead of word.
      
      - Provide Ostream::writeEntry method to reduce clutter and simplify
        writing of entries.
      
        Before
        ======
            os << indent << "name" << nl
               << indent << token::BEGIN_BLOCK << incrIndent << nl;
            os.writeKeyword("key1") << val1 << token::END_STATEMENT << nl;
            os.writeKeyword("key2") << val2 << token::END_STATEMENT << nl;
            os << decrIndent << indent << token::END_BLOCK << nl;
      
        After
        =====
            os.beginBlock("name");
            os.writeEntry("key1", val1);
            os.writeEntry("key2", val2);
            os.endBlock();
      
      - For completeness, support inline use of various Ostream methods.
        For example,
      
            os << beginBlock;
            os.writeEntry("key1", val1);
            os.writeEntry("key2", val2);
            os << endBlock;
      
      - For those who wish to write in long form, can also use endEntry inline:
      
            os.beginBlock("name");
            os.writeKeyword("key1") << val2 << endEntry;
            os.writeKeyword("key2") << val2 << endEntry;
            os.endBlock();
      
      The endEntry encapsulates a semi-colon, newline combination.
      06f22a9b
  2. 03 Oct, 2016 2 commits
  3. 30 Sep, 2016 12 commits
  4. 29 Sep, 2016 5 commits
  5. 28 Sep, 2016 2 commits
  6. 27 Sep, 2016 1 commit
  7. 26 Sep, 2016 5 commits
  8. 25 Sep, 2016 7 commits
  9. 24 Sep, 2016 1 commit
  10. 23 Sep, 2016 4 commits