www.mooseframework.org
MooseObjectName.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 MOOSEOBJECTNAME_H
16 #define MOOSEOBJECTNAME_H
17 
18 // STL includes
19 #include <string>
20 
47 {
48 public:
54  MooseObjectName(const std::string & tag,
55  const std::string & name,
56  const std::string & separator = std::string("/"));
57 
61  MooseObjectName(std::string name);
62 
66  MooseObjectName(const MooseObjectName & rhs);
67 
71  const std::string & name() const { return _name; }
72 
76  const std::string & tag() const { return _tag; }
77 
79 
86  bool operator==(const MooseObjectName & rhs) const;
87  bool operator!=(const MooseObjectName & rhs) const;
88  bool operator<(const MooseObjectName & rhs) const;
90 
92  friend std::ostream & operator<<(std::ostream & stream, const MooseObjectName & obj);
93 
94 protected:
99 
102  std::string _tag;
103  std::string _name;
104  std::string _combined;
105  std::string _separator; // used for better error messages only
107 
111  virtual void check();
112 };
113 
114 #endif // MOOSEOBJECTNAME_H
bool operator<(const MooseObjectName &rhs) const
std::string _combined
std::string _tag
const std::string & name() const
Return the name.
std::string _name
const std::string & tag() const
Return the tag.
virtual void check()
Check that the name and tag are supplied correctly.
MooseObjectName()
A constructor for use by MooseObjectParameterName.
bool operator!=(const MooseObjectName &rhs) const
std::string _separator
friend std::ostream & operator<<(std::ostream &stream, const MooseObjectName &obj)
Allows this to be used with std:: cout.
bool operator==(const MooseObjectName &rhs) const
Comparison operators.
A class for storing the names of MooseObject by tag and object name.