1. 31 Oct, 2019 1 commit
  2. 14 Feb, 2019 1 commit
    • Mark Olesen's avatar
      ENH: ensure self-assignment and self-swapping are a no-op for string types · 60c31415
      Mark Olesen authored
      - simplifies their use when reordering lists etc.
        (word, fileName, keyType, wordRe)
      
      - "unfriend" IO operators for string types. They require no internal access
      
      - add compile/uncompile methods to keyType for symmetry with wordRe
      
      - when outputting keyType/wordRe, be more explicit about them using
        writeQuoted()
      60c31415
  3. 06 Feb, 2019 1 commit
  4. 25 Nov, 2018 1 commit
  5. 18 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  6. 10 Sep, 2018 1 commit
  7. 24 Jul, 2018 1 commit
  8. 18 Jun, 2018 1 commit
  9. 12 Apr, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: reorder/refactor stream format options · 4cf932b2
      Mark Olesen authored
      - IOstreamOption class to encapsulate format, compression, version.
        This is ordered to avoid internal padding in the structure, which
        reduces several bytes of memory overhead for stream objects
        and other things using this combination of data.
      
        Byte-sizes:
            old  IOstream:48  PstreamBuffers:88  Time:928
            new  IOstream:24  PstreamBuffers:72  Time:904
      
      ====
      
      STYLE: remove support for deprecated uncompressed/compressed selectors
      
      In older versions, the system/controlDict used these types of
      specifications:
      
          writeCompression uncompressed;
          writeCompression compressed;
      
      As of DEC-2009, these were deprecated in favour of using normal switch
      names:
      
          writeCompression true;
          writeCompression false;
          writeCompression on;
          writeCompression off;
      
      Now removed these deprecated names and treat like any other unknown
      input and issue a warning. Eg,
      
         Unknown compression specifier 'compressed', assuming no compression
      
      ====
      
      STYLE: provide Enum of stream format names (ascii, binary)
      
      ====
      
      COMP: fixed incorrect IFstream construct in FIREMeshReader
      
      - spurious bool argument (presumably meant as uncompressed) was being
        implicitly converted to a versionNumber. Now caught by making
        IOstreamOption::versionNumber constructor explicit.
      
      - bad version specifier in changeDictionary
      4cf932b2
  10. 12 Nov, 2017 1 commit
    • Mark Olesen's avatar
      ENH: changed return value to bool for Ostream::write(const token&) · 5281dd48
      Mark Olesen authored
      - the return value signals if this method handled this particular type
        of token. This minor change allows this method to be used as a succinct
        prefilter an output token stream. It also provides better encapsulation
        of what the particular output stream handles.
      
        Eg,
      
            bool ok = os.write(tok);
            if (!ok)   // or   if (!ok && os.good())
            {
                os << tok;
            }
      
        instead of
      
            if (tok.type() == typeA || tok.type() == typeB || ...)
            {
                os.write(tok);
            }
            else
            {
                os << tok;
            }
      5281dd48
  11. 05 Nov, 2017 3 commits
  12. 03 Nov, 2017 1 commit
  13. 23 Oct, 2017 1 commit
    • Mark Olesen's avatar
      ENH: add reset() method to IStringStream · af5f8576
      Mark Olesen authored
      - for convenience and symmetry with OStringStream
      
      STYLE: void return value for stream rewind() methods
      
      - this makes it easier to design bidirectional streams
      af5f8576
  14. 20 Oct, 2017 1 commit
    • Mark Olesen's avatar
      ENH: additional low-level raw binary output for Ostream. · 74f667a8
      Mark Olesen authored
      - low-level beginRaw(), writeRaw(), endRaw() methods.
        These can be used to directly add '()' decorators for serial output
        or prepare/cleanup parallel buffers.
        Used, for example, when outputting indirect lists in binary to avoid.
      74f667a8
  15. 04 Jul, 2017 1 commit
  16. 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
  17. 15 Apr, 2016 1 commit
  18. 29 Feb, 2016 2 commits
  19. 10 Nov, 2015 1 commit
  20. 17 Jul, 2015 1 commit
  21. 14 Feb, 2015 1 commit
  22. 31 Dec, 2014 2 commits
    • Henry's avatar
      Updated headers · ded2f257
      Henry authored
      ded2f257
    • Henry's avatar
      Added and verified support for 64bit labels · 325b003b
      Henry authored
      To compile with 64bit labels set
      
      WM_LABEL_SIZE=64
      
      in ~/OpenFOAM/dev/prefs.sh
      
      source ~/.bashrc
      
      then Allwmake in OpenFOAM-dev.
      
      This will build into for example OpenFOAM-dev/platforms/linux64ClangDPInt64Opt
      
      If WM_LABEL_SIZE is unset or set to 32:
      
      WM_LABEL_SIZE=32
      
      the build would be placed into OpenFOAM-dev/platforms/linux64ClangDPInt32Opt
      
      Thus both 32bit and 64bit label builds can coexist without problem.
      325b003b
  23. 14 Aug, 2011 1 commit
  24. 19 Jan, 2011 1 commit
  25. 14 Jan, 2011 1 commit
  26. 07 Jan, 2011 1 commit
  27. 05 Jan, 2011 2 commits
  28. 11 Oct, 2010 1 commit
  29. 28 Jul, 2010 1 commit
  30. 16 Apr, 2010 1 commit
  31. 12 Apr, 2010 1 commit
  32. 30 Mar, 2010 1 commit
  33. 29 Mar, 2010 1 commit
  34. 12 Dec, 2009 1 commit
  35. 07 Dec, 2009 1 commit
    • Mark Olesen's avatar
      consistency update - writeCompression in system/controlDict · a19e488f
      Mark Olesen authored
      allow switch/bool values for writeCompression in system/controlDict
      
      - eg,
          writeCompression false; or writeCompression uncompressed;
          writeCompression true;  or writeCompression compressed;
      
      improves consistency with other controlDict parameters
      a19e488f