1. 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
  2. 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
  3. 05 Nov, 2017 3 commits
  4. 03 Nov, 2017 1 commit
  5. 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
  6. 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
  7. 04 Jul, 2017 1 commit
  8. 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
  9. 15 Apr, 2016 1 commit
  10. 29 Feb, 2016 2 commits
  11. 10 Nov, 2015 1 commit
  12. 17 Jul, 2015 1 commit
  13. 14 Feb, 2015 1 commit
  14. 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
  15. 14 Aug, 2011 1 commit
  16. 19 Jan, 2011 1 commit
  17. 14 Jan, 2011 1 commit
  18. 07 Jan, 2011 1 commit
  19. 05 Jan, 2011 2 commits
  20. 11 Oct, 2010 1 commit
  21. 28 Jul, 2010 1 commit
  22. 16 Apr, 2010 1 commit
  23. 12 Apr, 2010 1 commit
  24. 30 Mar, 2010 1 commit
  25. 29 Mar, 2010 1 commit
  26. 12 Dec, 2009 1 commit
  27. 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
  28. 04 Dec, 2009 1 commit
  29. 23 Jun, 2009 1 commit
  30. 22 Jun, 2009 1 commit
  31. 27 Feb, 2009 1 commit
    • Mark Olesen's avatar
      Preliminary work on hashing · 576d9388
      Mark Olesen authored
      - Hash returns unsigned
      - FixedList templated on unsigned int
      - include uLabel.H in UList, HashTable etc. so the output function is know
        throughout
      576d9388
  32. 23 Jan, 2009 1 commit
  33. 19 Jan, 2009 1 commit
    • Mark Olesen's avatar
      Support for single-quoted strings · 9087cd7b
      Mark Olesen authored
      - token class handles both single and double quoted strings. Single quoted
        strings are used to tag regular expressions. At the moment this is just
        syntactical sugar and isn't (yet) treated differently than double-quoted
        strings.
      
      - write output for std:string, with/without single quotes with the method
        writeQuoted(). Use distinct method name to avoid inadvertent compiler
        conversions.
      
      - write wordRe and keyType using writeQuoted()
      9087cd7b
  34. 03 Jan, 2009 1 commit
    • Mark Olesen's avatar
      reworked IOstreams · 1d866d7f
      Mark Olesen authored
      - Istream and Ostream now retain backslashes when reading/writing strings.
        The previous implementation simply discarded them, except when used to
        escape a double-quote or a newline. It is now vitally important to retain
        them, eg for quoting regular expression meta-characters.
      
        The backslash continues to be used as an escape character for double-quote
        and newline, but otherwise get passed through "as-is" without any other
        special meaning (ie, they are *NOT* C-style strings). This helps avoid
        'backslash hell'!
        For example,
           string:   "match real dots \.+, question mark \? or any char .*"
           C-style:  "match real dots \\.+, question mark \\? or any char .*"
      
      - combined subfiles in db/IOstreams, some had more copyright info than code
      - OPstreamI.H contained only private methods, moved into OPstream.C
      
      Are these really correct?
         IOstreams/Istream.H:#   include "HashTable.C"
         token/token.H:#define NoHashTableC
      1d866d7f
  35. 31 Dec, 2008 1 commit