• Mark Olesen's avatar
    ENH: adjustments to Switch · bb53e8ad
    Mark Olesen authored
    - align Switch more with Enum.
      Now have find(), found() static methods.
      Constructors with failsafe option.
    
      The find() method makes for clearer coding:
    
      OLD
    
         Switch sw(some_string, true); // NB: true = allowBad
    
         if (sw.valid()) ...
    
      NOW
    
         Switch sw = Switch::find(some_string);
    
         if (sw.good()) ...
    
      or
    
         if (Switch::found(some_string)) ...
    
    - improve construct from dictionary to handle all valid token types.
      Previously just read in a word.
    
    - Remove asText() method - replaced by c_str() and str() several
      versions ago.
    bb53e8ad
isoSurfaceBase.C 3.01 KB