www.mooseframework.org
MooseObjectParameterName.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "MooseObjectName.h"
14 
15 // STL includes
16 #include <string>
17 
27 {
28 public:
32  MooseObjectParameterName(std::string name);
33 
37  MooseObjectParameterName(const MooseObjectName & obj_name, const std::string & param);
38 
42  MooseObjectParameterName(const std::string & tag,
43  const std::string & name,
44  const std::string & param,
45  const std::string & separator = std::string("/"));
46 
48 
52  const std::string & parameter() const { return _parameter; }
53 
57  virtual void check() final;
58 
60 
70  bool operator==(const MooseObjectParameterName & rhs) const;
71  bool operator==(const MooseObjectName & rhs) const;
72 
73  bool operator!=(const MooseObjectParameterName & rhs) const;
74  bool operator!=(const MooseObjectName & rhs) const;
75 
76  bool operator<(const MooseObjectParameterName & rhs) const;
78 
79  // Allow printing with std:: cout
80  friend std::ostream & operator<<(std::ostream & stream, const MooseObjectParameterName & obj);
81 
82 protected:
84  std::string _parameter;
85 };
86 
MooseObjectName
A class for storing the names of MooseObject by tag and object name.
Definition: MooseObjectName.h:40
MooseObjectName::name
const std::string & name() const
Return the name.
Definition: MooseObjectName.h:71
MooseObjectParameterName::MooseObjectParameterName
MooseObjectParameterName(std::string name)
Build an object given a raw parameter name (e.g., from an input file parameter)
Definition: MooseObjectParameterName.C:39
MooseObjectName.h
MooseObjectParameterName
A class for storing an input parameter name.
Definition: MooseObjectParameterName.h:26
MooseObjectName::tag
const std::string & tag() const
Return the tag.
Definition: MooseObjectName.h:76
MooseObjectParameterName::check
virtual void check() final
Adds the parameter name to error checking.
Definition: MooseObjectParameterName.C:127
MooseObjectParameterName::_parameter
std::string _parameter
The name of the input parameter.
Definition: MooseObjectParameterName.h:84
std
Definition: TheWarehouse.h:80
MooseObjectParameterName::parameter
const std::string & parameter() const
Return the parameter name.
Definition: MooseObjectParameterName.h:52