- OSspecific: chmod() -> chMod(), even although it's not used anywhere
- ListOps get subset() and inplaceSubset() templated on BoolListType
- added UList<bool>::operator[](..) const specialization.
Returns false (actually pTraits<bool>::zero) for out-of-range elements.
This lets us use List<bool> with lazy evaluation and no noticeable
change in performance.
- use rcIndex() and fcIndex() wherever possible.
Could check if branching or modulus is faster for fcIndex().
- UList and FixedList get 'const T* cdata() const' and 'T* data()' members.
Similar to the STL front() and std::string::data() methods, they return a
pointer to the first element without needing to write '&myList[0]', recast
begin() or violate const-ness.
- uniform use of reinterpret_cast<foo*>(0) instead of
reinterpret_cast<foo*>(NULL)
- make all static null() members inline since they are really only a cast:
"*reinterpret_cast<foo*>(0)"
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or
'XX.size() <= 0' or for simpler coding.
It also has the same number of characters as '!XX.size()' and /might/ be
more readable
- many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1'
when a simple 'XX.size()' suffices
//- Does the surface need an update?
virtual bool needsUpdate() const = 0;
//- Mark the surface as needing an update.
// May also free up unneeded data.
// Return false if surface was already marked as expired.
virtual bool expire() = 0;
//- Update the surface as required.
// Do nothing (and return false) if no update was required
virtual bool update() = 0;
The constructors for the derived classes should generally start in a
'expired' condition (ie, needsUpdate() == true) and rely on a subsequent
call to the update() method to complete the initialization. Delaying the
final construction as late as possible allows the construction of
surfaces that may depend on intermediate calculation results (eg,
iso-surfaces) and also avoids the unnecessary reconstruction of surfaces
between sampling intervals.
It is the responsibility of the caller to ensure that the surface
update() is called before the surface is used. The update() method
implementation should do nothing when the surface is already up-to-date.
- the improved side-effect of enabling -zeroTimea alters default selection
behaviour and -latestTime selection behaviour for utilities in which
accidentally using the 0/ directory can cause damage (eg, reconstructPar)
- can combine -time ranges and -latestTime