www.mooseframework.org
MooseObjectParameterName.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 MOOSEOBJECTPARAMETERNAME_H
16 #define MOOSEOBJECTPARAMETERNAME_H
17 
18 // MOOSE includes
19 #include "MooseObjectName.h"
20 
21 // STL includes
22 #include <string>
23 
33 {
34 public:
38  MooseObjectParameterName(std::string name);
39 
43  MooseObjectParameterName(const MooseObjectName & obj_name, const std::string & param);
44 
48  MooseObjectParameterName(const std::string & tag,
49  const std::string & name,
50  const std::string & param,
51  const std::string & separator = std::string("/"));
52 
56  const std::string & parameter() const { return _parameter; }
57 
61  virtual void check() final;
62 
64 
74  bool operator==(const MooseObjectParameterName & rhs) const;
75  bool operator==(const MooseObjectName & rhs) const;
76 
77  bool operator!=(const MooseObjectParameterName & rhs) const;
78  bool operator!=(const MooseObjectName & rhs) const;
79 
80  bool operator<(const MooseObjectParameterName & rhs) const;
82 
83  // Allow printing with std:: cout
84  friend std::ostream & operator<<(std::ostream & stream, const MooseObjectParameterName & obj);
85 
86 protected:
88  std::string _parameter;
89 };
90 
91 #endif // MOOSEOBJECTPARAMETERNAME_H
bool operator!=(const MooseObjectParameterName &rhs) const
const std::string & parameter() const
Return the parameter name.
const std::string & name() const
Return the name.
MooseObjectParameterName(std::string name)
Build an object given a raw parameter name (e.g., from an input file parameter)
std::string _parameter
The name of the input parameter.
const std::string & tag() const
Return the tag.
virtual void check() final
Adds the parameter name to error checking.
friend std::ostream & operator<<(std::ostream &stream, const MooseObjectParameterName &obj)
bool operator<(const MooseObjectParameterName &rhs) const
A class for storing an input parameter name.
bool operator==(const MooseObjectParameterName &rhs) const
Comparison operators.
A class for storing the names of MooseObject by tag and object name.