StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Named.h
1 #ifndef NAMED_H
2 #define NAMED_H
3 #include <string>
4 
5 using std::string;
6 
16 class Named
17 {
18 public:
19  virtual ~Named();
20 
22  void setName(const string & newName);
23 
25  const string &getName() const;
26 
27 
29  bool isName(const string & aName) const;
30 
31 protected:
33  Named(const string & aName=" ");
34 
35 protected:
36 
37  string _name;
38 };
39 
40 
41 
42 #endif //
Definition: Named.h:16
bool isName(const string &aName) const
Determine whether name equals given name.
Definition: Named.cxx:27
void setName(const string &newName)
Set the name of the object.
Definition: Named.cxx:15
Named(const string &aName=" ")
Only derived class are Named.
Definition: Named.cxx:8
const string & getName() const
Get the name of the object.
Definition: Named.cxx:22