Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : // MOOSE includes 13 : #include "Moose.h" 14 : 15 : class InputParameters; 16 : 17 : template <typename T> 18 : InputParameters validParams(); 19 : 20 : /** 21 : * To be called in the validParams functions of classes that need to 22 : * operate on ranges of files. Adds several non-required parameters 23 : * that are parsed in the parseFileRange function. 24 : */ 25 : /** 26 : * Augments an InputParameters object with file range information. 27 : * Creates and adds a vector<string> with the list of filenames to the 28 : * params object for use by the calling object. The params object 29 : * passed in must contain suitable information for building the list 30 : * of filenames in the range. Returns a non-zero error code if there 31 : * is an error while parsing. 32 : */ 33 : class FileRangeBuilder 34 : { 35 : public: 36 : static InputParameters validParams(); 37 : 38 : FileRangeBuilder(const InputParameters & params); 39 : 40 438 : virtual ~FileRangeBuilder() = default; 41 : 42 400 : std::string fileSuffix() { return _file_suffix; } 43 400 : const std::vector<std::string> & filenames() { return _filenames; } 44 : 45 : protected: 46 : // int status(){ return _status; } 47 : void errorCheck(); 48 : 49 : int _status; 50 : std::string _file_suffix; 51 : std::vector<std::string> _filenames; 52 : };