Fluid structure interaction suite
patterns_unsigned_int.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2022 by Luca Heltai
4 //
5 // This file is part of the FSI-suite platform, based on the deal.II library.
6 //
7 // The FSI-suite platform is free software; you can use it, redistribute it,
8 // and/or modify it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation; either version 3.0 of the License,
10 // or (at your option) any later version. The full text of the license can be
11 // found in the file LICENSE at the top level of the FSI-suite platform
12 // distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef parsed_tools_patterns_h
17 #define parsed_tools_patterns_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/patterns.h>
22 
23 namespace dealii
24 {
25  namespace Patterns
26  {
27  class UnsignedInteger : public PatternBase
28  {
29  public:
30  static const unsigned int min_int_value;
31 
32  static const unsigned int max_int_value;
33 
34  UnsignedInteger(const unsigned int lower_bound = min_int_value,
35  const unsigned int upper_bound = max_int_value);
36 
37  virtual bool
38  match(const std::string &test_string) const override;
39 
40  virtual std::string
41  description(const OutputStyle style = Machine) const override;
42 
43  virtual std::unique_ptr<PatternBase>
44  clone() const override;
45 
46  static std::unique_ptr<UnsignedInteger>
47  create(const std::string &description);
48 
49  private:
50  const unsigned int lower_bound;
51 
52  const unsigned int upper_bound;
53 
54  static const char *description_init;
55  };
56  } // namespace Patterns
57 } // namespace dealii
58 
59 #endif
virtual std::string description(const OutputStyle style=Machine) const override
virtual bool match(const std::string &test_string) const override
static const unsigned int min_int_value
virtual std::unique_ptr< PatternBase > clone() const override
static const unsigned int max_int_value
static std::unique_ptr< UnsignedInteger > create(const std::string &description)
UnsignedInteger(const unsigned int lower_bound=min_int_value, const unsigned int upper_bound=max_int_value)