www.mooseframework.org
SyntaxFormatterInterface.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef SYNTAXFORMATTERINTERFACE_H
16 #define SYNTAXFORMATTERINTERFACE_H
17 
18 #include <string>
19 #include <ostream>
20 
21 #include "InputParameters.h"
22 #include "ActionWarehouse.h"
23 #include "MooseSyntax.h"
24 
33 {
34 public:
36  virtual ~SyntaxFormatterInterface() = default;
37 
43  virtual std::string preamble() const { return std::string(); }
44 
51  virtual std::string postscript() const { return std::string(); }
52 
57  virtual std::string preTraverse(short /*depth*/) const { return std::string(); }
58 
65  virtual std::string
66  printBlockOpen(const std::string & name, short depth, const std::string & doc) = 0;
67 
74  virtual std::string printBlockClose(const std::string & name, short depth) const = 0;
75 
82  virtual std::string printParams(const std::string & prefix,
83  const std::string & fully_qualified_name,
84  InputParameters & params,
85  short depth,
86  const std::string & search_string,
87  bool & found) = 0;
88 };
89 
90 #endif /* SYNTAXFORMATTERINTERFACE_H */
This interface is for classes that want to be called to format InputFileParameters.
virtual std::string preTraverse(short) const
This method is called once at each node in the syntax tree before traversing child nodes...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual std::string printBlockOpen(const std::string &name, short depth, const std::string &doc)=0
This method is called at the beginning of each Node in the tree.
virtual std::string printParams(const std::string &prefix, const std::string &fully_qualified_name, InputParameters &params, short depth, const std::string &search_string, bool &found)=0
This function is called for each InputParameters object stored at a particular node.
virtual std::string preamble() const
This method is called once at the beginning of the tree traversal and can be used to build up header ...
virtual std::string printBlockClose(const std::string &name, short depth) const =0
This method is called at the end of of each Node in the tree.
virtual std::string postscript() const
This method is called once at the end of the tree traversal and can be used to add any necessary trai...
virtual ~SyntaxFormatterInterface()=default