Skip to content
Snippets Groups Projects
  1. Jul 29, 2017
    • Mark OLESEN's avatar
      ENH: support "one-shot" changes to the dictionary inputMode (issue #429) · 4e48beff
      Mark OLESEN authored
      - Instead of relying on #inputMode to effect a global change it is now
        possible (and recommended) to a temporary change in the inputMode
        for the following entry.
      
           #default   : provide default value if entry is not already defined
           #overwrite : silently remove a previously existing entry
           #warn      : warn about duplicate entries
           #error     : error if any duplicate entries occur
           #merge     : merge sub-dictionaries when possible (the default mode)
      
        This is generally less cumbersome than the switching the global
        inputMode. For example to provide a set of fallback values.
      
            #includeIfPresent "user-files"
            ...
            #default value uniform 10;
      
        vs.
      
            #includeIfPresent "user-files"
            #inputMode protect
            ...
            value uniform 10;
            #inputMode merge    // _Assuming_ we actually had this before
      
        These directives can also be used to suppress the normal dictionary
        merge semantics:
      
           #overwrite dict { entry val; ... }
      4e48beff
  2. Jul 20, 2017
    • Mark OLESEN's avatar
      ENH: support full-scoping for keywords as lvalue (issue #429) · 2fdc6b16
      Mark OLESEN authored
      - patterns only supported for the final element.
      
        To create an element as a pattern instead of a word, an embedded
        string quote (single or double) is used for that element.
        Any of the following examples:
      
            "/top/sub/dict/'(p|U).*"     100;
            "/top/sub/dict/'(p|U).*'"    100;
            "/top/sub/dict/\"(p|U).*"    100;
            "/top/sub/dict/\"(p|U).*\""  100;
      
        are equivalent to the longer form:
      
            top
            {
                sub
                {
                    dict
                    {
                        "(p|U).*"     100;
                    }
                }
            }
      
        It is not currently possible to auto-vivify intermediate
        dictionaries with patterns.
      
          NOK   "/nonexistent.*/value"   100;
          OK    "/existing.*/value"      100;
      
      - full scoping also works for the #remove directive
      
              #remove "/dict1/subdict2/entry1"
      2fdc6b16
  3. Jul 13, 2017
  4. Jul 10, 2017
    • Mark OLESEN's avatar
      ENH: add dictionary searcher methods · 971213eb
      Mark OLESEN authored
      - csearch(), search(), csearchScoped(), searchScoped() methods
        can be used to find an entry and also retain the enclosing
        dictionary context.
      
      - To avoid ambiguity between a dot (.) as a scoping character and
        legal part of a keyword, entries can now be accessed directly using
        slash-scoping semantics similar to file-names:
      
          * cfindScopedDictPtr, findScopedDictPtr
      
      - To get or create a sub-dictionary entry:
      
          * makeScopedDictPtr, which behaves similarly to mkdirp in that it
            will create any intermediate dictionaries as required.
      971213eb
  5. Oct 28, 2017
  6. Oct 27, 2017
  7. Oct 26, 2017
    • Mark OLESEN's avatar
      STYLE: compilation of some unit tests · 8ec64d81
      Mark OLESEN authored
      8ec64d81
    • Mark OLESEN's avatar
      ENH: add fileName::validate static method (issue #628) · 16e75d84
      Mark OLESEN authored
      - similar to word::validate to allow stripping of invalid characters
        without triggering a FatalError.
      
      - use this validated fileName in Foam::readDir to avoid problems when
        a directory contains files with invalid characters in their names
      
      - adjust rmDir to handle filenames with invalid characters
      
      - fileName::equals() static method to compare strings while ignoring
        any differences that are solely due to duplicate slashes
      16e75d84
    • Mark OLESEN's avatar
      ENH: cleanup and rationalize memory-backed streams · 2bd2f83f
      Mark OLESEN authored
      - more consistent naming:
        * Versions that hold and manage their own memory:
            IListStream, OListStream
      
        * Versions that reference a fixed size external memory:
            UIListStream, UOListStream
      
      - use List storage instead of DynamicList within OListStream.
        Avoids duplicate bookkeeping, more direct handling of resizing.
      2bd2f83f
  8. Oct 25, 2017
    • Mark OLESEN's avatar
      ENH: relocate protected List::size(label) to UList (issue #595) · 5c1ec7ec
      Mark OLESEN authored
      - makes it accessible for containers that manage their own storage
        and derive directly from UList.
      
      - DynamicList::min_size() method to access the corresponding
        SizeMin template parameter.
      
      - ensure consistency in the reserve size for the constructor
      
            DynamicList<..> lst(N);
      
        now has identical sizing as
      
            DynamicList<..> lst();
            reserve(N);
      5c1ec7ec
  9. Oct 28, 2017
  10. Oct 26, 2017
  11. Oct 25, 2017
  12. Oct 24, 2017
  13. Oct 23, 2017
  14. Oct 20, 2017
  15. Oct 12, 2017
  16. Oct 19, 2017
  17. Oct 13, 2017