Commit Graph

5 Commits

Author SHA1 Message Date
Mark Olesen
faaa93fdb5 ENH: add IOobjectList::findObject() method
- naming similar to objectRegistry, with unambiguous resolution.
  The lookup() methods have different return types depending on the
  calling parameter.

STYLE: use IOobjectListTemplates.C for implementations

- previously included as local definition within IOobjectList.C,
  but will be adding more templated methods soon.

- adjust parameters (eg, matchName instead of matcher) to show their
  function

ENH: handle objectRegistry::names<void>(...)

- this is equivalent to no Type restriction, and can be used when
  filtering names. Eg,

     obr.names<void>(wordRe..);
2018-11-09 21:57:55 +01:00
Mark Olesen
db9cd2bc85 ENH: add IOobjectList append() method for building larger lists
- supports copy append and move append
2018-07-27 15:38:32 +02:00
Mark Olesen
c126464d1c ENH: change wordRes to be a List of wordRe instead of a wrapper (issue #259)
- this permits direct storage of a list with additional matcher
  capabilities

- provide wordRes::matcher class for similar behaviour as previously
2018-02-21 10:05:30 +01:00
Mark Olesen
345a2a42f1 ENH: simplify method names for reading argList options and arguments
- use succincter method names that more closely resemble dictionary
  and HashTable method names. This improves method name consistency
  between classes and also requires less typing effort:

    args.found(optName)        vs.  args.optionFound(optName)
    args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
    ...
    args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
    args.read<scalar>(index)   vs.  args.argRead<scalar>(index)

- the older method names forms have been retained for code compatibility,
  but are now deprecated
2018-01-08 15:35:18 +01:00
Mark Olesen
9761e9d81e ENH: added classes() method to objectRegistry/IOobjectList
- provides a summary hash of classes used and their associated object names.

  The HashTable representation allows us to leverage various HashTable
  methods. This hashed summary view can be useful when querying
  particular aspects, but is most useful when reducing the objects in
  consideration to a particular subset. For example,

      const wordHashSet interestingTypes
      {
          volScalarField::typeName,
          volVectorField::typeName
      };

      IOobjectList objects(runTime, runTime.timeName());
      HashTable<wordHashSet> classes = objects.classes();

      classes.retain(interestingTypes);

      // Or do just the opposite:
      classes.erase(unsupportedTypes);

  Can also use the underlying HashTable filter methods

STYLE: use templated internals to avoid findString() when matching subsets
2017-05-17 10:43:24 +02:00